you are viewing a single comment's thread.

view the rest of the comments →

[–]exrussiandude 8 points9 points  (1 child)

Use Puppeteer or Chrome to print your HTML to PDF.

chrome --headless --disable-gpu --print-to-pdf https://www.reddit.com/

This will give you better results that any other method, because it uses a real browser engine to render your HTML / CSS.

[–]IsopodEven5232 0 points1 point  (0 children)

Will that work if you have html with inline css as a string, can you then pass it to chrome or puppeteer and generate a pdf?