PDF/A conversion
The PDF/A conversion is done by the Pdfa web service.
| HTTP REST-API | OpenAPI |
|---|---|
POST /pdfa/{documentId} | π |
To perform a PDF/A conversion, select convert in the parameters for the web service call. Use the level option to select the target format for the PDF/A conversion.
{
"pdfa": {
"convert": {
"autoTagging": false,
"errorCorrection": {
"enabled": false
},
"errorReport": "message",
"imageQuality": 75,
"level": "1a",
"successReport": "none"
}
}
}
If the conversion to PDF/A is successful, the server saves the modified PDF document.
If errors occurred during the conversion, then an exception is triggered on the web service call. The exception then contains anΒ error code (errorCode) and a text message (message) about the error.
You can activate the XML report (errorReport) for the PDF/A conversion in order to get more details about the conversion, regardless of whether for a successful or a faulty execution. The report provides information about what kind of problems are present in the source document and which ones are still present after a PDF/A conversion has been carried out.
The results of the XML report generation operation can be checked with the following parameters:
errorReportsuccessReport
Further information on the options can be found in the description of the web service parameters.
Conversion stepsβ
A PDF/A conversion consists of three steps:
- An analysis of the problems in the PDF file (see the
analysisnode in the XML report). - Conversion of the file to correct the problems, if this is possible
- Subsequent analysis (see node
post-analysisin the XML report) to verify that all problems have been resolved.
Not all problems in a PDF file can be fixed if a PDF/A conversion is performed after the PDF source document has been created. Some requirements of the PDF/A standard can only be implemented if they were taken into account when the original PDF document was created. This is especially true for conformance level "a" in the PDF/A standard.
It is recommended that the newer PDF/A-2 or PDF/A-3 versions be used instead of the βold" PDF/A-1 standard. These standards are enhancements which have resulted from the practical usage of PDF/A documents. These newer versions of the standard tend to better reflect the practical significance of PDF/A documents. For example, in the current PDF/A-3 standard, it is possible to embed documents with any number of formats, which was not allowed at all in the PDF/A-1 standard.
Error correctionβ
The PDF/A conversion function attempts to automatically correct problems in existing PDF documents without affecting the content of the PDF document. However, this cannot be guaranteed if an existing PDF document contains syntax errors (in the PDF syntax). For this reason, the PDF/A conversion is aborted if there is a risk of content-related (or visual) deviations.
In this case, you can use the errorCorrection parameter to force error correction. The error correction attempts to correct the PDF syntax to possibly enable a PDF/A conversion after all. Note that activating error correction does not always work if a PDF document is (structurally) too corrupt.
If you force error correction, the content of the PDF document may vary. Always check the PDF document after conversion.
Fontsβ
Make sure that the fonts on which the PDF documents you want to convert to PDF/A format are based are installed. If the fonts are not present, the PDF/A conversion may be aborted. All fonts must always be embedded during PDF/A conversion.
If you want to convert third-party formats (e.g. Word documents) to PDF/A, do not perform font embedding when converting via the "Converter" web service. Leave the embedding of the fonts to the "Pdfa" web service.
| HTTP REST-API | OpenAPI |
|---|---|
POST /converter/{documentId} | π |
Set the parameter embedFonts to false
If fonts are not present and cannot be embedded, the following errors will occur in the XML report of the PDF/A converter:
"output.pdf", 9, 20, 0x00418704, "The font ShinGo must be embedded.", 1