function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PharaohgirlPharaohgirl 

Is there another method to export to PDF other than renderAs="PDF"?

I have a visualforce page with javascript (tablesorter).

It's vital that I specify the sort order for several tables in the PDF output - it can't be a random order which is what happens without tablesorter.

I know that renderAs="PDF" ignores javascript, so is there any alternate method to export to PDF?

Even just loading the visualforce page from the object and then a manual 'save as PDF' doesn't work, because there's no way to hide the Salesforce header in Lightning.

Any suggestions?

Thanks!

Rowena
Raj VakatiRaj Vakati
No .. the only way you can do it by using  renderAs="PDF" .. 


But you can have another alternative.. use PDF.Js to render the PDF so that you can export the js 
Raj VakatiRaj Vakati
https://mozilla.github.io/pdf.js/
PharaohgirlPharaohgirl

Hi Raj,

Thank you for replying. I had a look at PDF.Js but unfortunately it's way out of my ability to implement that.

Thanks for trying to help!

Rowena