Live data from Hacker News

Show HN: Webpage to PDF Microservice

imti.co

21–30 of 36 posts

Re: Show HN: Webpage to PDF Microservice

#21

I've reported many bugs in projects that turn "URL" to "PDF". You need to be sure you're limiting the kind of URLs that people can submit. For example ensure that nobody makes a PDF of : * file:////etc/passwd * http://169.254.169.254/latest/meta-data/local-hostname * http://localhost:8080/ I'd say over half of the "PDF-creation" projects posted here have been vulnerable to some/all of those attacks. (I continue to be…

I'm the owner/dev of one of those paid services, and yes, competition is fierce, but people do still pay for the convenience of not having to manage it themselves. One look at the issue count of puppeteer/phantomjs/selenium/slimer... tells its own story.

Re: Show HN: Webpage to PDF Microservice

#23

I've reported many bugs in projects that turn "URL" to "PDF". You need to be sure you're limiting the kind of URLs that people can submit. For example ensure that nobody makes a PDF of : * file:////etc/passwd * http://169.254.169.254/latest/meta-data/local-hostname * http://localhost:8080/ I'd say over half of the "PDF-creation" projects posted here have been vulnerable to some/all of those attacks. (I continue to be…

Also that people can't use them to mine crypto currency. Seen owner of one such project blog about how that happened to them.

Re: Show HN: Webpage to PDF Microservice

#25
post #18
post #15

I'm still looking for a service like this, but that creates a nicely tagged PDF and conveys the HTML structure in the PDF tags. Tagged PDFs are a requirement in many processes for accessibility or archival reasons.

Why not using HTML instead of PDF? I'm the author of an extension that allows to save faithfully a web page into an HTML file [1]. From my point of view, that should be the best solution for archiving web pages in a file. Votes on HN disagree with me though [2], I wished I could understand why. [1] https://github.com/gildas-lormeau/SingleFile [2] https://news.ycombinator.com/item?id=18243721

read recently PDF is defacto standard by government

Re: Show HN: Webpage to PDF Microservice

#27

I've reported many bugs in projects that turn "URL" to "PDF". You need to be sure you're limiting the kind of URLs that people can submit. For example ensure that nobody makes a PDF of : * file:////etc/passwd * http://169.254.169.254/latest/meta-data/local-hostname * http://localhost:8080/ I'd say over half of the "PDF-creation" projects posted here have been vulnerable to some/all of those attacks. (I continue to be…

These are great security suggestions and I should make some clarifications on the intended use. We use txPDF as a backend Microservice and not open to direct public use. It is good for automating report generation from other portions of a larger system.

Re: Show HN: Webpage to PDF Microservice

#28
post #14
post #13

A basic command line alternative using Headless Chrome[1]: chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/ [1] https://developers.google.com/web/updates/2017/04/headless-c...

Similar functionality is packaged in wkhtmltopdf, which essentially runs Webkit headless to print to PDF. https://wkhtmltopdf.org/

txPDF is a simple containerized web services wrapper around wkhtmltopdf, intended to be used as a Microservice component in a larger system.

Re: Show HN: Webpage to PDF Microservice

#30
alternatively if you want a SaaS REST API:

   curl https://service.prerender.cloud/screenshot/https://google.com/ > out.jpg

   curl https://service.prerender.cloud/pdf/https://google.com/ > out.pdf

   curl https://service.prerender.cloud/https://google.com/ > out.html

https://www.prerender.cloud/
Post reply on HN