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

Use Nutrient DWS HTML-to-PDF API to convert HTML and CSS into high-fidelity PDFs for invoices, reports, statements, and reusable templates. Support 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

Pair this task page with free trial signup, API key setup, DWS guides, and implementation paths for REST, Postman, curl, JavaScript, Python, Java, C#, PHP, and HTTP so a query like 'HTML to PDF API with CSS support' leads directly to a working prototype instead of a generic landing page.


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 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

No document storage

No input or resulting documents are stored on our infrastructure. All files are deleted as soon as a request finishes. Alternatively, check out our self-hosted product.

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.

Ready to try it?

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