Xportability / css-to-pdf

Convert any HTML page or region to PDF - supports CSS, SVG, embedded XML objects, and more..
http://www.cloudformatter.com/CSS2Pdf
206 stars 78 forks source link

Question about css #17

Closed reddo closed 8 years ago

reddo commented 8 years ago

I've read through relevant parts of the documentation, but it's not mentioned anywhere: must the styles be inline in oder for the script to parse them? It doesn't seem to apply any of my styles to the rendered pdf. Maybe I'm doing something wrong.

Also a question bugging me: is it possible for the script to render a hidden element as the pdf? The layout of the pdf differs from my page and I'd like to hide a div on the page and the script render that.

kbrown01 commented 8 years ago

Zoltan:

The Javascript is walking the “div” you pass and resolving all the styles, creating an alternate “div” with all the styles within it, inline.

Given that, it is unclear to me what styles are not resolving. CSS can be external file, inside