PDF to PDF/A
Converts a PDF or an image to the PDF/A archival format (ISO 19005).#
/lmkit/v1/pdf-to-pdfaConverts an existing PDF (or an image, laid out first as a one-page PDF) to PDF/A-1b, 2b or 3b. The conversion repairs the document in place: non-embedded fonts are replaced by embedded equivalents with reconciled metrics, device colours are calibrated through embedded ICC profiles, prohibited constructs and compression are removed or re-encoded, and archival metadata is rebuilt. Text, vector graphics, and layout are preserved. Every conversion applies every repair it can first; the 'fallback' setting governs only content that still cannot be made conforming afterwards. The default rebuilds just those residual pages from rendered images with an invisible text layer, guaranteeing a conforming output. The converted document is stored on the server and returned as a file ID, together with a report of detected features and applied fixes. This is a pure document processing operation that does not require an AI model. Returns 422 Unprocessable Entity with an ErrorResponse body if the input file cannot be processed. The 'error' field contains one of: 'password_required' (encrypted PDF), 'invalid_format' (not a valid PDF), 'unsupported_security' (unsupported encryption), 'page_error' (content error).
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | The source PDF document (base64 or file identifier). |
input_format | How the input is provided. Defaults to 'Base64EncodedFile'. | |
level | Targeted conformance level. Default: 'PdfA2b'. | |
fallback | Behavior for content that still cannot be made conforming after every repair has been applied (the conversion always attempts every possible repair first). 'Rasterize' (default) rebuilds only the residual pages from rendered images with an invisible searchable text layer, guaranteeing a conforming output and the highest success rate; 'ReportOnly' keeps the original content and lists the remaining violations; 'Fail' rejects the conversion. | |
password | string | Password used to open the source document when it is encrypted. The output is always unencrypted, as PDF/A requires. |
raster_dpi | object (int32) | Rendering resolution in DPI used by the raster fallback. Range: 72-600. Default: 200. |
raster_jpeg_quality | object (int32) | JPEG quality (1-100) for page images produced by the raster fallback. Default: 92. |
include_text_layer | boolean | When true (default), the raster fallback overlays the source text as invisible, searchable text on each page image. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 422 | Unprocessable Entity | |
| 400 | Bad Request |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-to-pdfa" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "",
"input_format": "Base64EncodedFile",
"level": "PdfA2b",
"fallback": "Rasterize",
"password": "string"
}'