Jspdf: Switch to print css file before downloading pdf

Created on 8 Dec 2015  路  5Comments  路  Source: MrRio/jsPDF

Hi there

Is there a way to swap out the webpage's css file to the media @print css file before saving the PDF?
Could work better for PDF layouts. Any tips / ideas?

Thanks

All 5 comments

I'm interested to this as well

+1

+1000 ;)

Any thoughts about this issue?!

Probably using jQuery or CommonJS to create an div-element, I call it now container-Element, with position fixed and left -10000px. Then cloning the to have to be printed elements into this one element. Apply print.css by adding an class to the container-Element so that child-Elements are using print-CSS. Then call your jspdf code on the container-Element

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akshaybhoendie picture akshaybhoendie  路  36Comments

matb picture matb  路  38Comments

Asturias-sam picture Asturias-sam  路  27Comments

g0ddest picture g0ddest  路  58Comments

rhanka picture rhanka  路  77Comments