The pdfToolbox Rest API - Operation: Preflight
The Preflight operation executes a pdfToolbox Preflight profile on one or more PDF files. It is the primary processing operation of the REST API and can be used to validate, correct, optimize, or convert PDF documents.
When to use
Use the Preflight operation whenever you want to process a PDF using a pdfToolbox Preflight profile.
Typical use cases include:
- Validate PDF files against production or archival standards.
- Correct PDF problems automatically.
- Convert documents to PDF/X, PDF/A, or other supported standards.
- Optimize or normalize PDF files.
- Run quality assurance checks in automated workflows.
Endpoint
Submit a POST request to the Preflight endpoint.
The request is processed asynchronously. After submitting the request, the server returns an operation ID that can be used to monitor progress and retrieve the results. See Overview for the general processing workflow.
Request
A Preflight request consists of:
- one or more input PDF files,
- the Preflight profile to execute,
- optional profile variables,
- optional processing parameters.
Preflight profile
Every request must specify the Preflight profile that should be executed.
The profile defines the checks, corrections, and processing steps that pdfToolbox performs.
For a list of the available built-in profiles, see Predefined Profiles.
Variables
Some Preflight profiles require or support variables that customize their behavior.
Variables are supplied as part of the request.
To determine which variables a profile supports, use the Retrieve Profile Variables operation.
For more information about working with variables, see Using Variables.
Response
When the request is accepted, the server returns an operation ID.
Once processing has completed, the operation provides:
- the processed PDF document (if applicable),
- the Preflight report,
- processing status information,
- error information if processing failed.
The exact output depends on the selected Preflight profile.
Example workflow
A typical Preflight workflow consists of the following steps:
- Select the Preflight profile to execute.
- (Optional) Retrieve the profile variables.
- Submit the Preflight request.
- Wait for processing to complete.
- Download the processed PDF and the generated report.
Related topics
- Retrieve Profile Variables Determine which variables a profile supports.
- Using Variables Learn how to supply variables in a request.
- Predefined Profiles Browse the available built-in Preflight profiles.