/// CONVERT
2 credits

URL to PDF API — save any webpage as PDF

Wait for `networkidle`, block ads, and archive pages exactly as they render.

/// Quick answer

URL to PDF loads a live web page in a headless browser, waits for it to finish rendering, and returns the result as a PDF. The setting that most affects output is when the capture fires — a page captured before its JavaScript finishes produces a blank or half-loaded document. Use a network-idle condition, or wait for a specific element on single-page applications.

Try URL to PDF API — free →Read the docs

Free account. No card required.

How does the URL to PDF API work?

One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.

curl -X POST https://www.ashdocs.com/api/v1/tools/url-to-pdf \
  -H "X-API-Key: ash_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","options":{"format":"A4"}}'

How do I use URL to PDF API in Make, Zapier or n8n?

MAKE

Add an HTTP "Make a request" module, POST the URL as JSON, and turn off Parse response so the PDF binary arrives intact.

Make setup guide →
ZAPIER

Use Webhooks by Zapier with a POST action and map the returned file URL into a Drive upload or an email attachment.

Zapier setup guide →
n8n

Use the HTTP Request node with Response Format set to File and a named binary property.

n8n setup guide →
AIRTABLE

Trigger on a record containing a URL, capture the page, and write the PDF back to an attachment field.

Airtable setup guide →

Common problems and fixes

SymptomCauseFix
The PDF is blankThe capture fired before the page finished renderingWait for network idle rather than the load event, or wait for a specific element to appear. This is the most common failure by a wide margin.
Images below the fold are missingLazy loading — a headless renderer never scrollsEnable full-page capture with auto-scroll, or inject CSS forcing eager image loading.
A cookie banner covers the contentThe consent overlay renders before the captureInject CSS hiding the banner, and reset body overflow — many banners lock scrolling, which truncates the capture even after the banner is hidden.
Only the first screen is capturedThe renderer captured the viewport rather than the full documentEnable full-page capture.
Backgrounds and colours are missingPrint rendering suppresses backgrounds by defaultSet printBackground: true.
The request times out on a heavy pageDashboards making many API calls may never reach idleRaise the timeout, wait on a specific element instead, or use an asynchronous pattern with a webhook callback.

Common use cases

Frequently asked questions

How do I convert a URL to PDF?+

Send the URL to the endpoint. It loads the page in a headless browser, waits for rendering to complete, and returns the PDF. Set the wait condition to network idle and enable printBackground for accurate output.

Why is my URL to PDF output blank?+

The capture fired before the page finished rendering. Use a network-idle wait condition rather than the load event, or wait for a specific element — particularly on single-page applications built with React or Vue.

Can I capture a page that requires a login?+

Yes, by passing session cookies or authentication headers. Consider the security implications first — a signed, time-limited URL granting read access to that page is usually safer than transmitting a session token to a third party.

How do I remove cookie banners from the capture?+

Inject CSS hiding the banner elements and reset body overflow to visible, since many consent banners lock page scrolling. Alternatively set the consent cookie before navigating so the banner never renders.

Does URL to PDF capture the whole page or just the visible area?+

Full-page capture is available and renders the entire document height across multiple pages. Without it you get only the initial viewport.

RELATED TOOLS