Need to PDF Export ALL Tabs

I am trying to export a PDF of my form with multiple tabs (10 in total).

There was a previous post that was discussing how to do this by putting this in the CSS portion of the form itself:

https://plumsail.com/docs/forms-sp/how-to/export-pdf.html

.k-pdf-export .tabset .tab-content div.tab-pane.fade {
display: block !important;
opacity: 1 !important;
}

I can get one tab to export, and the PDF preview looks like it leaves a ton of space for the rest of the tabs to come over as well, however it only wants to export the first tab. Any suggestions on how to get around this?

Thanks!

Dear @cmersino,
Which browser are you using? We’ve tested most of them, and this code does work and shows all the tabs.

Can you show us a screenshot of the form?

Also, if you just put this:

.tabset .tab-content div.tab-pane.fade {
display: block !important;
opacity: 1 !important;
}

You should be able to see Tab contents of all tabs, even without exporting to PDF. Can you show us a screenshot of that as well!

1 Like

Hey Nikita,

Thanks for the code, looks like it is all outputting in the PDF print now. One last thing, is there a way to filter out all variables on the form that don’t have any data associated to it? This form has like 300+ fields and a lot of show/hide logic in it. It would be helpful to exclude any variables with no data in them.

Thanks!

Hi Nikita,
I was trying to understand this but the page that was referred to https://plumsail.com/docs/forms-sp/how-to/export-pdf.html has since been removed. I'm basically trying to create a button to print all tabs (except one) into a PDF. Is there another article somewhere?

thank you,
Peter

Hello @peter.harrison,

Find the instructions here:

1 Like

Thank you Margarita,
That works like a dream :grinning:

I've now added a button to make the PDF option more noticeable and to also save the PDF with a specific name.
It generates the PDF with all the tabs, but my multi line text boxes are all blank. Whereas If I click on the default PDF button to generate the PDF they are are complete.

This is the code for the click properties of the button fd.exportToPDF('FileName');

Is there anything else I need to do?

Is it a Plain or Rich text field? If it is Rich Text field, it's content cannot be exported to PDF due to how the field is setup. You can export it on Display form when the field is in read-only mode. Or copy value from Rich Text field to HTML control, hide Rich Text field, and only show the control in PDF export. This is done with CSS.

1 Like

Thanks Margarita,
I have the CSS for rich text working from the default button, but not on my custom button.
My custom button was only to make it more prominent as the pdf button is very modest
But after your reply a much easier solution dawned on me – just increase the size of the PDF button!
How stupid of me to not think of this in the first place. :blush:

.ms-Icon.ms-Icon--PDF {
font-size: 40px; /* Adjust this value to make the icon bigger /
width: 60px; /
Adjust the width /
height: 60px; /
Adjust the height */

1 Like