python - Use Javascript To Print Page As PDF (With Django) -


i need convert web page pdf because won't print/look correct if isn't converted. because web page big, html document browser try , split multiple pages (not vertically, fine, horizontally, bad). though planned on server side django, realized virtually of available libraries written python2, when using python 3.

so other option client side. thing find on stackoverflow this: convert html ( having javascript ) pdf using javascript, of answers in java, not javascript.

i think ideal solution change style more printer friendly rather making pdf.

if have pdf created javascript, there's library jspdf http://parall.ax/products/jspdf out there creating pdfs javascript. have write on own parse page create matching pdf.

if can use php, recommend using dompdf, written translate webpages pdfs, there less work involved there. https://github.com/dompdf/dompdf i've used library, , seems decent, though doesn't support css styling.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -