Public APIs
Convert HTML to PDF API favicon

Convert HTML to PDF API

Documents & Productivity

This API converts any HTML (file, url, base64) to a PDF.

Convert HTML to PDF API's website screenshot

About Convert HTML to PDF API

The HTML to PDF API converts HTML content into PDF files, accepting input as a remote URL, a base64-encoded payload, or a direct file upload. Output can be returned either as a downloadable PDF binary or as a signed link (a data URI pointing to the generated file), depending on which endpoint is used. Several endpoints support an optional landscape orientation parameter, and download variants allow the output filename to be specified.

The API exposes 6 POST endpoints covering combinations of input method (URL, base64, file upload) and output method (binary download or signed link). File uploads are capped at 100MB total per request, with a note to use the URL-based endpoint for larger files. It is intended for generating PDFs such as invoices, reports, receipts, archived snapshots, or printable versions of existing web pages.

The service is hosted on ApyHub, is at version 1.0.0, and is listed as a verified provider on the platform.

Key features

  • Convert HTML to PDF from a remote URL, base64 payload, or direct file upload
  • Return results as downloadable PDF binary or as a signed link URI
  • Optional landscape orientation via a landscape query parameter
  • Custom output filename via an output query parameter
  • 6 POST endpoints covering url, base64, and file input methods

Frequently asked questions

What input formats does the API accept?

It accepts a remote HTML URL, a base64-encoded HTML payload, or a direct HTML file upload.

How is the converted PDF returned?

Depending on the endpoint, the PDF is returned either as raw binary data for direct download or as a JSON object containing a signed data URI link.

Can I generate landscape-oriented PDFs?

Yes, several endpoints accept an optional landscape boolean query parameter, which defaults to false.

What is the file size limit for uploads?

File uploads are limited to a maximum of 100MB total per request.

What would I use this API for?

It's suited for generating invoices, reports, receipts, archived snapshots, or printable versions of existing HTML web pages.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product