Apply CSS class to PDF Print/Download Button

This is a way to add a class to your print/download button. This way, you can edit the CSS of the print button specifically to your liking.

  • Not yet re-checked
  • Classic builder

Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

Screenshot for “Apply CSS class to PDF Print/Download Button”

This is a way to add a class to your print/download button. This way, you can edit the CSS of the print button specifically to your liking.

Step 1

Hover over the info icon of your PDF print component to get the component ID.

Screenshot for “Apply CSS class to PDF Print/Download Button”

Step 2

Add the following code to the JavaScript tab of the page to create a CSS class.

Text
TB.render('component_XX', function(data) {
    data.ele[0].children[0].classList.add("btn-sm");
});
Screenshot for “Apply CSS class to PDF Print/Download Button”

Step 3

Add the class selector to your CSS tab and customize it as desired.

Screenshot for “Apply CSS class to PDF Print/Download Button”

Original Community Post:

Apply CSS class to PDF Print/Download Button - Community Discussions / Tips and Tricks - Tadabase Community

Was this page helpful?

Something wrong or missing on this page? Tell us.