HTML-to-PDF API for templates, invoices, reports, and CSS-heavy layouts

Use Nutrient’s DWS HTML-to-PDF API to convert HTML and CSS into high-fidelity PDFs for invoices, reports, statements, and reusable templates. Supports assets, fonts, headers, footers, API keys, and developer-friendly REST, Postman, curl, and SDK workflows without running your own document rendering infrastructure.

Accurate HTML- and CSS-to-PDF output

Handle styled documents, reusable templates, invoices, reports, and other HTML-to-PDF workflows where layout fidelity, fonts, and asset support matter to developers evaluating conversion APIs.

Built for templates and production documents

Move from a basic HTML file to richer PDFs with external CSS, images, fonts, headers, footers, and fillable form fields using a cloud API designed for document workflows.

Fast path from query to implementation

Start with a free trial, API key setup, DWS guides, and implementation paths for REST, Postman, curl, JavaScript, Python, Java, C#, PHP, and HTTP to go from a query like “HTML-to-PDF API with CSS support” to a working prototype.

Used by Lufthansa, Disney, Autodesk, UBS, Dropbox, IBM
Lufthansa
Disney
Autodesk
UBS
Dropbox
IBM

Try it out

This example will create a PDF from the supplied index.html file and render it on an A4-sized page. For detailed information on how to structure your HTML files, along with all the available customization options, visit our guides.


Try it out in three steps

  1. Add an HTML file named index.html to your project folder.
  2. Run the code from the same folder.
  3. Open result.pdf to see the output.
curl -X POST https://api.nutrient.io/processor/generate_pdf \
-H "Authorization: Bearer your_api_key_here" \
-o result.pdf \
--fail \
-F html=@index.html

Start now

Create an account to access your API key and start with 50 free credits per month

Start building with DWS Processor API in minutes — no payment information required.

Already have an account? Sign in →

API comparison

BASIC

Convert to PDF API

Straightforward API for converting to PDF. Perfect for most use cases.


FEATURES

  • Simple request format
  • Minimal configuration required
  • Purpose-built for specific tasks
ADVANCED

Build API

Maximum flexibility and advanced features for complex workflows.


FEATURES

  • Multipart document support
  • Advanced actions and transformations
  • Workflow orchestration

Getting started

Implementation options

Teams evaluating HTML-to-PDF conversion usually want more than rendering quality — they also want a fast path from API key to working request; a clear way to test CSS support; and confidence that templates, invoices, and reports can move into production. Nutrient supports REST, Postman, curl, JavaScript, Python, Java, C#, PHP, and raw HTTP workflows so developers can validate HTML and CSS conversion quickly with real files before committing to deeper integration work.


Download sample documents

Try generating PDFs with different HTML templates. Download our various sample documents and customize them to your needs.


Security is our top priority

SOC 2 Type 2 audited

Nutrient’s infrastructure is SOC 2 Type 2 audited and GDPR-compliant. See our privacy policy and security documentation for details on data handling.

HTTPS encryption

All communication between your application and Nutrient is done via HTTPS to ensure your data is encrypted when it’s sent to us.

Safe payment processing

All payments are handled by Paddle. Nutrient DWS Processor API never has direct access to any of your payment data.

Frequently asked questions

What is an HTML-to-PDF API?

An HTML-to-PDF API converts HTML and CSS into pixel-perfect PDF documents via REST. Nutrient’s DWS Processor API lets you generate invoices, reports, statements, and reusable templates without running your own document rendering infrastructure.

Can the HTML-to-PDF API render CSS print media queries?

Yes. The API supports CSS styling — including print media queries, fonts, background images, external stylesheets, headers, and footers — so you can produce production documents like invoices and reports.

Does the HTML-to-PDF API preserve fonts and images?

Yes. The API supports embedded and external fonts, background images, and inline images. Assets referenced in your HTML are included in the generated PDF.

Is the HTML-to-PDF API SOC 2 compliant?

Yes. The API is backed by Nutrient’s SOC 2 Type 2-audited infrastructure — built for use in business-critical and regulated workflows.

Which programming languages does the HTML-to-PDF API support?

You can call the API from any language that makes HTTP requests. Nutrient provides examples for JavaScript, Python, Java, C# (.NET), and PHP, plus REST, curl, a Postman collection, and raw HTTP.

Can AI agents generate PDFs through this API?

Yes. The make-pdf agent skill in the public Nutrient skills marketplace turns Markdown or HTML into a finished PDF through this API — including tagged PDF/UA and archival PDF/A outputs — and verifies every compliance build before an agent passes it downstream. Learn more on the make-pdf skill page.

Is there a free tier for the HTML-to-PDF API?

Yes. Sign up to receive processing credits and try the HTML-to-PDF API before choosing a Processor API plan.

Ready to try it?

Create an account to get your DWS Processor API key and start making API calls.