Skip to content

Convert PDFs to PDF/A or PDF/UA

POST
/v1/pdf/convert
curl -H "X-Api-Key: $KEY" -F files=@a.pdf -F pdfa=PDF/A-2b \
http://localhost:9027/v1/pdf/convert -o archive.pdf

PDFs to PDF/A or PDF/UA through LibreOffice, with the same post-processing fields as /v1/convert.

Media typemultipart/form-data

The multipart form /v1/convert and /v1/pdf/convert accept. LibreOffice options (landscape, nativePageRanges, exportFormFields, singlePageSheets, password, …) and post-processing fields (merge, splitMode, watermarkSource, stampSource, rotateAngle, flatten, metadata, bookmarks, embeds, facturxXml, userPassword, …) are accepted as well.

object
assets

Images (PNG, JPEG, GIF, SVG), stylesheets and fonts an HTML page names by file name, as in <img src="logo.png">. Every stylesheet applies to the whole page. Nothing is fetched from anywhere else.

Array<string>
files
required

One or more documents.

Array<string>
htmlEngine

What turns HTML into PDF: fulgur (default), a layout engine with no browser and no network, or libreoffice.

string | null

Example

fulgur
landscape
boolean | null
merge

Merge several inputs into one PDF instead of returning a ZIP.

boolean | null
nativePageRanges
string | null

Example

1-3,5
outputFilename
string | null
password

Opens a protected input.

string | null
pdfa

PDF/A level: PDF/A-1b, PDF/A-2b, PDF/A-3b, PDF/A-4.

string | null
pdfua

Export as PDF/UA.

boolean | null
to

Output format. Default pdf.

string | null

The converted PDF, or a ZIP of them

Media typeapplication/octet-stream

The file, as bytes.

string format: binary

Accepted; the result goes to the webhook

The request is wrong

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

An engine is unavailable or the request timed out

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}