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

yankeeBrit picture yankeeBrit  路  3Comments

sajesh1985 picture sajesh1985  路  5Comments

NoFootDancer picture NoFootDancer  路  3Comments

sayo96 picture sayo96  路  3Comments

BarathArivazhagan picture BarathArivazhagan  路  4Comments