HTML to PDF + Screenshot API

Turn any webpage into a PDF or image with one POST request.

HTMLPress gives developers two browser-powered outputs from the same product family: polished PDFs for documents and PNG screenshots for previews, embeds, and automation.

Start with the HTML to PDF endpoint below, then try the live demo to switch between PDF and screenshot generation in seconds.

curl -X POST "https://htmltopdf.bespokeweb.nl/api/pdf" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","format":"A5","landscape":true,"margin":10}' \
  -o page.pdf
One API family, two outputs

Turn any webpage into a document or an image.

HTMLPress ships two browser-powered conversion APIs: one for pixel-perfect PDFs, one for crisp screenshots. Both run the same real browser engine, so what your page looks like is what you get back.

/api/pdf
Source webpagenetworkidle2
Generated PDF
Inline browser preview
A4 default
formatpageRanges
LandscapePOST JSONScalePrint background
HTML to PDF API

Generate presentation-ready PDFs from any webpage URL.

The PDF endpoint opens the target page in Puppeteer, waits for the page to settle, then streams the generated document back inline. It is a practical fit for invoices, reports, and browser-rendered documents that need to preserve their styling.

  • Convert any webpage with a single JSON POST request — the same options also work as GET query parameters.
  • Pick a paper format, switch to landscape, and fine-tune scale and margins when the defaults are not enough.
  • Export exactly the pages you need with page ranges, with backgrounds preserved for print-ready output.
Screenshot API

Capture crisp webpage images and embeddable payloads.

The image endpoint renders the target URL in the same browser engine, then returns either raw image bytes or a base64-encoded response for systems that need to store or embed the result directly.

  • Capture any public URL as a PNG, JPEG, or WebP image rendered in a real headless browser.
  • Send just a URL and get a sensible capture out of the box, or set your own width, height, and full-page mode.
  • Receive raw image bytes to store as a file, or a base64 string that drops straight into your HTML or database.
/api/image
ViewportCustom sizes
format=pngencoding=base64width/heightfullPage
Live demo

Run the real API against any public webpage.

Pick PDF or Image, submit a public URL, and preview the actual response from the HTMLPress live demo. There is no mocked backend here: the widget hits the internal demo route, downloads the returned blob, and shows it inline.

Output
PDF format
Orientation
The preview uses object URLs locally and sends POST requests to the internal `/api/demo` route.

Like what you see?

Create an account, verify your email, and start your 3-day trial with both APIs included.

Register for access
Pricing

Start with a free trial, then pick the plan that fits your team.

HTMLPress keeps pricing simple: full access for 3 days, then a choice between Pro and Business.

3-day free trial

Try everything free for 3 days.

Test both APIs with full access and no credit card required. If HTMLPress fits your workflow, keep going with Pro or Business.

Start free trial
Pro
€9/month
Most popular

For teams shipping regular PDF and screenshot workflows.

  • Both APIs included
  • 300 requests per hour
  • Email support
Choose Pro
Launch pricing — subject to change.
Business
€29/month

For larger operations that need more room and faster human help.

  • Both APIs included
  • Unlimited requests
  • Priority support
Choose Business
Launch pricing — subject to change.
FAQ

Answers to the questions developers usually ask first.

These answers stay intentionally close to the code that exists today. No invented SLA language, no fictional async jobs, and no hidden free tier.

A4 is the default for the PDF endpoint, and you can pass any Puppeteer-supported `format` value such as A0 to A6, Letter, Legal, or Tabloid. You can also switch between portrait and landscape output with the `orientation` query param.