It looks like when generating the PDF version, the print module unsets (strips out) all the screen rendered css, and should apply either..
yourmodulesdirectory/print/css/print.css
Or you can add your own in
yoursiteurl/admin/config/user-interface/print/common

I have not been able to get any of these CSS files to have any impact at all on my generated PDF, using TCPDF or WKHTMLTOPDF.

Most importantly, I don't want to use a custom print.css, I want to render what is seen on the screen.
I see from the issue queue that many people want this too, and there doesn't seem to be an easy solution.
Could we add a tick box option in the settings to allow the PDF to render from the screen output?

Comments

Yuri’s picture

Got the same problem, very eager to have this working

jcnventura’s picture

Status: Active » Closed (cannot reproduce)

I've just tested and the CSS is applied, to the extent that the CSS is supported by the tools (only wkhtmltopdf supports 100%).

As to the request on using the "screen" CSS, that's actually against the design of the module, but you can always try the patch in #1423056: Allow original theme CSS to be applied as well.

medden’s picture

Thanks... I ended up just copying huge hunks of CSS from my global.css to my print.css.
It was a messy way to do things, but it did allow for some fine tuning or borders and margins. Also the rendered pdf didn't support any CSS 3 properties.

+1 for keeping the print.css separate from the screen rendered css. It gives users 100% control over the printed output.
Happy for this issue to be closed.