apilayer / html2pdf.it

Webservice for generating pdfs from html
html2pdf.it
548 stars 157 forks source link

Can i add more than one js and css file #35

Closed nandhacse closed 7 years ago

nandhacse commented 9 years ago

In my project i just wanted to add multiple css and js. Is it possible to add

edm00se commented 7 years ago

Yes, you absolutely can use multiple CSS and JS files.

I do recommend performance checking your site, as I can confirm that a horribly constructed and un-optimized site (for example, cnn.com) will not render a viable readable page in html2pdf.it's rendering; this is no fault of html2pdf.it, as loading up the site in Chrome with DevTools enabled shows that the DOMContentLoaded was registered at just shy of 3 seconds and full page Load at over 12 seconds, with no cached network responses on a decent quality high speed connection. This means that in a reasonable period of time to most users, 1-2 seconds on the slower side, there was no visible or useful content anyway.

Here's a screen shot of my DevTools output, with thumbnails for the loading times enabled. As you can see, the primary rendering of the screen was still occurring through the 5 second mark. screen shot 2016-11-20 at 3 05 10 pm

The main concept I'm getting at is "garbage in, garbage out".