can anybody tell me how to include user-style-sheet ind wkhtlmtopdf v. 0.10?
I'm refering to a local file, but that doesn't effect my Pdf anyway.
switches += "--user-style-sheet \User\...\style.css "
What about using a 'real' URL syntax with your switch? Something like
switches += "--user-style-sheet file:///User/.../style.css"
Another option to using the argument is to inject the stylesheet programmatically before the PDF conversion happens. Perhaps by using a URL parameter that identifies if a page is being fed to wkhtmltopdf or by downloading the page, injecting the CSS reference and then regurgitating the page for wkhtmltopdf.
In terminal
wkhtmltopdf -V
wkhtmltopdf 0.12.2.4
Command
wkhtmltopdf --user-style-sheet yourcssfile.css yourhtmlfile.html outputfile.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With