web-to-pdf

Web page to PDF

Capture a live web page as a PDF after JavaScript execution and asset load, with strict SSRF guards that block private and metadata address ranges.

Format facts

Source MIME
text/html
Target MIME
application/pdf
Max input size
Plan-dependent
Typical output size
Variable; a 200 KB landing page often renders to a 600 KB PDF
Lossy?
No
Backed by
webpage-to-pdf
Availability
Live public API
Endpoint
POST /api/v1/url/render

How the conversion runs

  1. Step 1. POST a public URL to /api/v1/url/render; DNS resolution is checked before any browser navigates.
  2. Step 2. Private, loopback, link-local, multicast and cloud metadata ranges are rejected before queueing.
  3. Step 3. A pooled Chromium worker loads the page, waits for the requested readiness condition and prints the viewport to PDF.

API example

curl -X POST https://api.docushell.com/api/v1/url/render \
  -H "Authorization: Bearer $DOCUSHELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

Submit returns a queued job with job_id. Poll GET /api/v1/jobs/{id}, then download with GET /api/v1/jobs/{id}/download.

Format-specific quirks

  • Pages behind login screens capture the login screen unless you pass an authenticated public URL.
  • Long-running pages can time out if network idle never settles.
  • Sticky headers and cookie banners may appear in the PDF unless the page hides them for print media.

Frequently asked questions

Does DocuShell run page JavaScript?

Yes. The live webpage renderer allows JavaScript after the URL has passed SSRF validation.

Can it capture private intranet URLs?

No. Private and metadata address ranges are blocked before navigation.

What address ranges are blocked?

RFC1918 private, loopback, link-local, CGNAT, multicast and cloud metadata ranges are blocked.

Related conversions