Flatten PDF API

Flatten preexisting annotations in PDF files to prevent unauthorized edits with our PDF flattening API.

Prevent unauthorized changes

Flatten comments, highlights, form fields, and other annotations to make them non-editable and visually locked into a PDF.

Automate with Zapier

Automatically flatten annotations in new PDF files uploaded to Google Drive using our Zapier integration. Just drop a file into a folder. Nutrient handles the rest, with no manual editing required.

Simple and transparent pricing

Select a package that suits your needs according to the number of credits you wish to spend. Each API tool and action has a specific credit cost.

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

Try it out

This example will flatten all the annotations in your supplied document into the PDF. This ensures they're no longer editable.


Try it out in three steps

  1. Add an annotated PDF named document.pdf 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/build \
-H "Authorization: Bearer your_api_key_here" \
-o result.pdf \
--fail \
-F document=@document.pdf \
-F instructions='{
"parts": [
{
"file": "document"
}
],
"actions": [
{
"type": "flatten"
}
]
}'

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 →


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.


Frequently asked questions

What is a flatten PDF API?

A flatten PDF API merges interactive layers — annotations, form fields, and overlays — into the static page content of a PDF with a single API call. With Nutrient’s DWS Processor API, you can flatten documents without building your own PDF tooling.

How do I flatten a PDF programmatically?

Send your PDF to the Nutrient DWS Processor API, and it returns a flattened document. You can call it via REST, Postman, curl, JavaScript, Python, Java, C#, or PHP.

What gets flattened?

Annotations, form fields, and layered content are baked into the page so the resulting PDF renders identically everywhere and can no longer be edited — useful for finalizing signed or completed documents.

Which programming languages does the API support?

You can call the API from any language that can make HTTP requests. We provide quick start examples for JavaScript, Python, Java, C# (.NET), and PHP, plus REST and a Postman collection.

Is there a free flatten PDF API?

Yes. You can start for free — sign up to receive processing credits and try the flatten 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.