Skip to main content

Convert PDF to PDF/X with the API

Convert an existing PDF to PDF/X-1a or PDF/X-4 for print production. Provide a publicly accessible HTTPS URL or a Base64-encoded PDF, choose an ICC profile, and receive the converted PDF or a temporary download link.

Plan availability

PDF/X conversion through the API requires the Growth plan or higher. You can try it in the Playground on any plan.

Try in Playground

Endpoints​

MethodEndpointSuccessful response
POST/v1/tools/convert-pdfx/directPDF bytes with Content-Type: application/pdf
POST/v1/tools/convert-pdfx/syncJSON with result metadata and a download URL when using default storage

Both endpoints wait for conversion to complete before responding.

Authentication​

Use a conversion API key in the API-KEY header.

API-KEY: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Find your key on the API Credentials page in your Dashboard.

Convert a PDF to PDF/X from a URL​

The examples use a public sample PDF. To convert your own file, set url to its direct HTTPS URL. The code examples below convert it to PDF/X-4 using the FOGRA39 profile and save the result as print-ready.pdf.

The examples use the Direct endpoint. To receive a download URL, replace /direct with /sync and read the response as JSON. The documentUrl field contains the download URL.

{
"url": "https://pdfbolt.com/samples/pdfx-conversion-sample.pdf",
"printProduction": {
"colorSpace": "cmyk",
"pdfStandard": "pdf-x-4",
"iccProfile": "fogra39",
"preserveBlack": true
}
}

Convert a Local PDF to PDF/X​

Read your local PDF file and encode its contents as Base64. Replace BASE64_PDF in the examples below with the encoded data, without the data:application/pdf;base64, prefix.

{
"pdf": "BASE64_PDF",
"printProduction": {
"colorSpace": "cmyk",
"pdfStandard": "pdf-x-4",
"iccProfile": "fogra39",
"preserveBlack": true
}
}

Request Parameters​

Set the Content-Type header to application/json. Include either url or pdf in the JSON body, not both. Encrypted or password-protected PDFs are not supported.

url​

Type: string

Required: Yes, if pdf is omitted

Details: Direct, publicly accessible HTTPS URL of the input PDF. Maximum length: 2,048 characters.

URLs must not contain login credentials or fragments such as #page=2. Redirects, private network addresses, and custom headers for downloading the PDF are not supported.

Usage:

{
"url": "https://pdfbolt.com/samples/pdfx-conversion-sample.pdf"
}

pdf​

Type: string

Required: Yes, if url is omitted

Details: Base64-encoded contents of the input PDF, without the data:application/pdf;base64, prefix.

Usage:

{
"pdf": "BASE64_PDF"
}

printProduction​

Type: object

Required: No

Default Value: pdfStandard: "pdf-x-4", iccProfile: "fogra39", preserveBlack: true

Details: Sets the PDF/X standard, ICC profile, and black preservation. Output is always CMYK.

Usage:

{
"url": "https://pdfbolt.com/samples/pdfx-conversion-sample.pdf",
"printProduction": {
"colorSpace": "cmyk",
"pdfStandard": "pdf-x-4",
"iccProfile": "fogra39",
"preserveBlack": true
}
}
ParameterTypeDefaultValuesDescription
colorSpacestringNot set"cmyk"Output is always CMYK.
pdfStandardstring"pdf-x-4""pdf-x-4"
"pdf-x-1a"
Target PDF/X standard.
iccProfilestring"fogra39""fogra39"
"fogra51"
"swop"
"gracol"
ICC profile used for color conversion.
preserveBlackbooleantruetrue
false
Keeps pure RGB black as 100% K when enabled.
Defaults and parameter requirements
  • Send only url or pdf to use the defaults: PDF/X-4, FOGRA39, and preserveBlack: true.
  • When setting iccProfile, also set colorSpace to "cmyk".
  • When setting preserveBlack, set colorSpace to "cmyk" or include pdfStandard.

PDF/X-4 preserves live transparency. PDF/X-1a flattens transparency. Use the PDF/X standard and ICC profile required by your print provider. See Print Production for details on standards, profiles, and black preservation.

filename​

Type: string

Required: No

Default Value: convert-pdfx.pdf

Details: Output PDF filename in the Content-Disposition header. Maximum 255 characters. Allowed characters: A–Z, a–z, 0–9, ., _, and -. Provide the filename with or without the .pdf extension.

Usage:

{
"pdf": "BASE64_PDF",
"filename": "print-ready.pdf"
}

contentDisposition​

Type: string

Required: No

Default Value: inline

Details: Specifies whether the browser should display or download the PDF.

  • "inline": Display the PDF in the browser, if supported.
  • "attachment": Prompt a download.

Usage:

{
"pdf": "BASE64_PDF",
"filename": "print-ready.pdf",
"contentDisposition": "attachment"
}

customS3PresignedUrl​

Type: string

Required: No

Details: Uploads the converted PDF to your S3-compatible bucket using an HTTPS pre-signed PUT URL. Available only with /v1/tools/convert-pdfx/sync. Maximum 2048 characters.

The URL must remain valid until the upload completes. On success, isCustomS3Bucket is true, and documentUrl and expiresAt are null. Omit this parameter to use PDFBolt's temporary storage.

See Uploading to Your S3 Bucket for setup details.

Usage:

{
"pdf": "BASE64_PDF",
"filename": "print-ready.pdf",
"contentDisposition": "attachment",
"customS3PresignedUrl": "https://your-bucket.s3.amazonaws.com/print-ready.pdf?<presigned-query-params>"
}

Successful Response​

The response format depends on the endpoint.

Returns HTTP 200 with the converted PDF in the response body.

Content-Type: application/pdf

Save the response body as a PDF file. The result is not stored for later download.

Failure Response​

Failed conversions consume no credits. Check errorCode and errorMessage for details before retrying.

HTTP statusCommon causeAction
400Invalid parameters, an inaccessible URL or PDF download timeout, an encrypted or invalid PDF, failed PDF/X validation, or a plan restriction.Check errorMessage and correct the input or settings. PDF/X API access requires Growth or higher.
400Custom S3 upload failed (CUSTOM_S3_UPLOAD_ERROR, Sync only).Check the pre-signed URL and upload permissions.
413The input PDF, request body, or output PDF exceeds its size limit.Reduce the file or request size.
See Limits and Credits.
422The PDF/X processing time limit was exceeded (CONVERSION_TIMEOUT).Use a smaller or less complex PDF. Retrying the same document may time out again.

Example validation error:

{
"timestamp": "2026-11-03T10:00:00Z",
"httpErrorCode": 400,
"errorCode": "BAD_REQUEST",
"errorMessage": "PDF/X requires CMYK output."
}

See Error Handling for the error response format and other common errors.

Limits and Credits​

LimitValue
Input files per request1 PDF
Input PDF size100 MB

Encrypted, empty, and invalid PDFs are rejected.

Successful conversions cost one credit per started 5 MB of output. Failed conversions consume no credits.

Requests share your account's rate limits. The x-pdfbolt-conversion-cost response header reports the credits charged.

Processing time and output size depend on the document. PDF/X-1a conversion may take longer and produce a larger file because of transparency flattening. Both endpoints wait for conversion to finish.