3 ms·
I didn’t understand going through HTML to render it with a headless browser instead of rendering the PDF directly with Ghostscript or something like that.
by elondaits 6y ago
I didn’t understand going through HTML to render it with a headless browser instead of rendering the PDF directly with Ghostscript or something like that.
- eli 6y agoI used poppler-utils but the OP apparently used imagemagick on PDFs directly which I didn’t know was possible. (To be fair the device does HTML rendering by default and the API for pushing images isn’t super obvious)
- asiachick 6y ago2 reasons I'd use HTML 1. I'm taking untrusted PDFs and running them on my machine. Using something like say puppeteer that PDF renderer runs in a sandbox. Ghostscript, not so much. PDFs can have code in them 2. Using HTML via puppeteer lets me render tons of other things I might want to render than just PDFs. Plenty if beautiful algorithmic art out there that runs in a browser.