url-to-pdf

Infrastructure

web page to pdf api

SHOW HN2017

url-to-pdf

Ready-to-use API to convert any web page to PDF using headless Chrome

apify.com

#html to pdf#headless chrome#puppeteer#web page pdf api

129points
64comments
#325of 2,242 in 2017
Top 15%of 2017 by points

How HN took it

CuriousMostly questions and neutral comments

4 positive, 18 neutral or asking, 0 mixed, 6 critical, out of 28 comments about the project. Thread score 0.00.

Idea: 3 for, 2 againstExecution: 0 for, 3 againstPricing: 1 for, 0 againstPerformance: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful for programmatic PDF generation, easy to call from anywhere

    From 2 comments
    • You can call the API from anywhere, from resource-constrained servers, Docker containers that cannot run headless Chrome, JavaScript on a website etc. Also, we'll keep adding new…
      jancurn on HN
    • I love this service! I think ease of adoption you can allow pre-made scripts to be shared so the non-technical can easily set up work flows that go right into their email. For…
      phmagic on HN

Objections

  • Converting to PDF is lossy, so it is a poor choice for archiving

    From 1 comment
    • converting to pdf is lossy, i wouldn't use this for archiving purposes, normally i use webrecorder for archiving.
      xfer on HN
  • Headless Chrome lacks GPU support, so some sites render incorrectly

    From 1 comment
    • As long as GPU support is not functional in headless, "any web page" is a misnomer. A large enough percentage of sites use GPU acceleration so that headless mode is useless. This…
      colordrops on HN
  • Command-line Chrome can already do this

    From 1 comment
    • Saving a webpage to a PDF is literally one command line away: chromium --headless --disable-gpu --print-to-pdf=google.pdf http://google.com/ What does Apify add in this case?
      conradk on HN

Requests

  • Accept raw HTML instead of a URL

    From 1 comment
    • Is there a similar API around that accepts HTML instead of a URL? I’ve build one for my project, but I would prefer to delegate this to an external service.
      jeppebemad on HN
  • Support for headers, footers and page numbers

    From 1 comment
    • We are not too happy with our EvoPDF license so in the basis this is a good option. However, I do not think this allows adding headers, footers, page numbers etc.
      sebazzz on HN
  • Support for pages behind login or SSO

    From 1 comment
    • Does this work if the page is behind a password/SSO wall? And is it possible to print multiple Chrome tabs? Printing pages to PDF is pretty straightforward. It's the above two…
      panda888888 on HN

Questions

  • How does it compare to commercial renderers like PrinceXML

    From 1 comment
    • Any info how this compares to commercial html to pdf renderers like PrinceXML?
      ak39 on HN
  • Does it produce accessible PDFs

    From 1 comment
    • Question: does this create accessible PDFs? That would be a really nice _possible_ work around for screen reader users having issues with a website.
      Robdel12 on HN

Alternatives named

  • wkhtmltopdf

    From 2 comments
    • Thanks, I didn't know that was a thing. I was checking out wkhtmltox earlier this week as well. Looks like there are a lot of options available for this. I suspect Apify's using…
      scaryclam on HN
    • There's also wkhtmltopdf that more or less does the same thing using webkit.
      Natsu on HN
  • PrinceXML

    From 2 comments
    • Any info how this compares to commercial html to pdf renderers like PrinceXML?
      ak39 on HN
    • In my experience, Prince is great for static HTML + CSS rendering, but its JavaScript engine is pretty lackluster -- I couldn't get it to work with rendering React components,…
      schneidmaster on HN
  • Bookmark Archiver

    From 2 comments
    • Many projects are already using this for archiving purposes. Check out https://github.com/pirate/bookmark-archiver It's robust because the modern web is pretty much built for…
      nikisweeting on HN
    • If you're interested in running your own personal Way-Back machine that uses Chrome headless for archiving (among other methods), check out Bookmark Archiver.…
      nikisweeting on HN
  • Screen.rip

    From 1 comment
    • I built Screen.rip, which also supports PDF generation. https://screen.rip/#pdf Screen.rip gives you more control over the generated PDF beyond Puppeteer's options (like it can…
      laktek on HN
  • Urlbox

    From 1 comment
    • Also check out https://urlbox.io/. YC alum, super helpful.
      dmmalam on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/15611265)