Section:

PDF/A Manager exit codes, formats & reporting

Apryse's PDF/A Manager is a command-line application designed to validate and convert generic PDF documents to PDF/A (ISO 19005-1) compliant format. This section covers basic usage and the command string syntax, used both in the PDF/A Manager Command-Line Application as well as in PDF/A Manager SDK.

Basic Syntax

The basic command-line syntax is:

pdfa [options] file1 file2 folder1 file3 ...

See more options in Command-Line Summary for PDF/A Manager

Exit Codes

To provide additional feedback, PDF/A Manager returns exit codes after completing processing. The exit codes can be used to provide user feedback for logging, etc. This is particularly important for applications running in an unattended environment.

The following table lists possible exit codes and their description:

sh

1Exit Code Description
2--------------- ------------------------------------------------------------------
30 All files converted successfully.
41 Document is secured. Need a valid password to open the document.
52 Error opening the input file(s).
63 An unknown exception encountered.

All codes other then '0' indicate that there was an error during the conversion process.

The following illustrates a sample Windows batch script that processes exit codes:

sh

1@echo off rem convert all PDF files in 'data' folder
2pdfa ./data
3if errorlevel 1 goto passwd
4if errorlevel 2 goto inputerr
5if errorlevel 3 goto othererror
6if errorlevel 0 goto exit
7
8:passwd
9echo Document is protected. Need a valid password to open the document.
10goto exit
11
12:inputerr
13echo No input files specified.
14goto exit
15
16:othererror
17echo An error encountered during processing.
18goto exit
19
20:exit

PDF/A Manager Reporting

This section covers PDF/A Manager report formats and all the possible error conversion and validation options.

PDF/A Manager XML Report Format

By default PDF/A Manager stores details of validation and conversion processing in an XML file. The report is saved as 'report.xml' in the output directory. Similarly, the style sheet for the report is saved as 'report.xsl' in the output directory. Double clicking on 'report.xml' will launch a web browser display HTML report as shown in the following figure:

Apryse Docs Image

The report includes the following information:

  • The date and time when the report was generated
  • A listing of files that fail validation prior to conversion. The information in this table includes the input PDF filename, error code, error message, and a list of relevant PDF object numbers.
  • A listing of files that pass validation and for which no conversion is necessary.
  • A listing of files that fail validation after to conversion. Usually this list includes files that can't be fully converted to PDF/A without significant information loss.
  • A final list of files that pass validation after conversion.

The general structure of XML report is as follows:

sh

1<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="report.xsl"?>
2<PDFAManagerReport RunDateTime="2009-Jul-16 22:46:04">
3 <Validation>
4 <Fail FileName="my.pdf" FileNameAndPath="c:\my.pdf">
5 <Error Code="e_PDFA232" Message="Not a valid ICC color profile" Refs="3"/>
6 </Fail>
7 </Validation>
8 <Validation>
9 <Fail FileName="license.pdf" FileNameAndPath="c:\ license.pdf"> <Error Code="e_PDFA185" Message="'obj' not followed by EOL marker" Refs="1, 2, 3, 4, 5, 6, 7, 8, 9, 12"/>
10 <Error Code="e_PDFA341" Message="The font is not embedded" Refs="16, 17, 18"/>
11 <Error Code="e_PDFA353" Message="Embedded TrueType font program..." Refs="16, 17, 18"/>
12 <Error Code="e_PDFA723" Message="The XMP Metadata stream is not valid" Refs="39"/>
13 <Error Code="e_PDFA2331" Message="Device-specific color space used, but no GTS_PDFA1 OutputIntent" Refs="1, 4, 14"/>
14 </Fail>
15 </Validation>
16</PDFAManagerReport>

To disable report generation, simply include '--noxml' in the command-line string. Disabling XML report generation will direct processing results to the console window.

sh

1c:\PDFA\ >pdfa --noxml -c -o OUT my.pdf Processing...
2VLD-[FAIL]: my.pdf
3 - e_PDFA185: 'obj' not followed by EOL marker Obj Refs:1, 2, 3, 4, 5, 6, 7, 8, 9, 12
4 - e_PDFA341: The font is not embedded Obj Refs:16, 17, 18
5 - e_PDFA723: The XMP Metadata stream is not valid Obj Refs:39
6 - e_PDFA2331: Device-specific color space used, but no GTS_PDFA1 Output Intent Obj Refs:1, 4, 14
7CNV-[PASS]: my_pdfa.pdf

PDF/A Manager Validation and Conversion Error Codes

PDF/A Manager analyzes the content of existing PDF files and performs a sequence of modifications in order to produce a PDF/A compliant document. Features that are not suitable for long-term archiving (such as encryption, obsolete compression schemes, missing fonts, or device-dependent color) are replaced with their PDF/A compliant equivalents.

PDF/A Level B Validation Errors

The following table is a non-exhaustive list of checks and conversions performed by PDF/A Manager for Level B Validation:

sh

1Error Code Description
2---------------- ------------------------------------------------------------------------------------------------------------------------
3e_PDFA0_1_1 Corrupt document
4e_PDFA0_1_2 Corrupt content stream.
5e_PDFA0_1_3 Using JPEG2000 compression (PDF 1.4 compatibility).
6e_PDFA0_1_4 Contains compressed object streams (PDF 1.4 compatibility).
7e_PDFA0_1_5 Contains cross-reference streams (PDF 1.4 compatibility).
8e_PDFA1_2_1 Document does not start with % character.
9e_PDFA1_2_2 File header line not followed by % and 4 characters > 127.
10e_PDFA1_3_1 The trailer dictionary does not contain ID.
11e_PDFA1_3_2 Trailer dictionary contains Encrypt.
12e_PDFA1_3_3 Data after last EOF marker.
13e_ PDFA1_3_4 Linearized file: ID in 1st page and last trailer are different.
14e_PDFA1_4_1 Subsection header: starting object number and range not separated by a single space.
15e_PDFA1_4_2 'xref' and cross reference subsection header not separated by a single EOL marker.
16e_PDFA1_6_1 Invalid hexadecimal strings used.
17e_PDFA1_7_1 The 'stream' token is not followed by CR and LF or a single LF.
18e_PDFA1_7_2 The 'endstream' token is not preceded by EOL.
19e_PDFA1_7_3 The value of Length does not match the number of bytes.
20e_PDFA1_7_4 A stream object dictionary contains the F, FFilter, or FDecodeParms keys.
21e_PDFA1_8_1 Object number and generation number are not separated by a single white-space.
22e_PDFA1_8_2 Generation number and 'obj' are not separated by a single white-space.
23e_PDFA1_8_3 Object number not preceded by EOL marker
24e_PDFA1_8_4 'endobj' not preceded by EOL marker
25e_PDFA1_8_5 'obj' not followed by EOL marker
26e_PDFA1_8_6 'endobj' not followed by EOL marker
27e_PDFA1_10_1 Using LZW compression.
28e_PDFA1_11_1 A file specification dictionary contains the EF key.
29e_PDFA1_11_2 Contains the EmbeddedFiles key
30e_PDFA1_12_1 Array contains more than 8191 elements
31e_PDFA1_12_2 Dictionary contains more than 4095 elements
32e_PDFA1_12_3 Name with more than 127 bytes
33e_PDFA1_12_4 Contains an integer value outside of the allowed range
34e_PDFA1_12_5 Exceeds the maximum number (8,388,607) of indirect objects in a PDF file.
35e_PDFA1_12_6 The number of nested q/Q operators is greater than 28
36e_PDFA1_13_1 Optional content (layers) not allowed.
37e_PDFA2_2_1 DestOutputProfile-s in OutputIntents array do not match.
38e_PDFA2_3_2 Not a valid ICC color profile.
39e_PDFA2_3_3 The N entry does not match the number of color components in the embedded ICC profile.
40e_PDFA2_3_3_1 Device-specific color space used, but no GTS_PDFA1 OutputIntent.
41e_PDFA2_3_3_2 Device-specific color space, does not match OutputIntent.
42e_PDFA2_3_4_1 Device-specific color space used in an alternate color space.
43e_PDFA2_4_1 Image with Alternates key.
44e_PDFA2_4_2 Image with OPI key.
45e_PDFA2_4_3 Image with invalid rendering intent.
46e_PDFA2_4_4 Image with Interpolate key set to true
47e_PDFA2_5_1 XObject with OPI key.
48e_PDFA2_5_2 PostScript XObject.
49e_PDFA2_6_1 Contains a reference XObject.
50e_PDFA2_7_1 Contains an XObject that is not supported (e.g. PostScript XObject
51e_PDFA2_8_1 Contains an invalid Transfer Curve in the extended graphics state.
52e_PDFA2_9_1 Use of an invalid rendering intent
53e_PDFA2_10_1 Illegal operator.
54e_PDFA3_2_1 Embedded font is damaged.
55e_PDFA3_3_1 Incompatible CIDSystemInfo entries
56e_PDFA3_3_2 Type 2 CIDFont without CIDToGIDMap
57e_PDFA3_3_3_1 CMap not embedded
58e_PDFA3_3_3_2 Inconsistent WMode in embedded CMap dictionary and stream.
59e_PDFA3_4_1 The font is not embedded.
60e_PDFA3_5_1 Embedded composite (Type0) font program does not define all font glyphs.
61e_PDFA3_5_2 Embedded Type1 font program does not define all font glyphs.
62e_PDFA3_5_3 Embedded TrueType font program does not define all font glyphs.
63e_PDFA3_5_4 The font descriptor dictionary does not include a CIDSet stream for CIDFont subset.
64e_PDFA3_5_5 The font descriptor dictionary does not include a CharSet string for Type1 font subset.
65e_PDFA3_6_1 Widths in embedded font are inconsistent with /Widths entry in the font dictionary.
66e_PDFA3_7_1 A non-symbolic TrueType font must use WinAnsiEncoding or MacRomanEncoding.
67e_PDFA3_7_2 A symbolic TrueType font must not specify encoding.
68e_PDFA3_7_3 A symbolic TrueType font does not have exactly one entry in cmap table.
69e_PDFA4_1 Transparency used (ExtGState with soft mask).
70e_PDFA4_2 Transparency used (XObject with soft mask).
71e_PDFA4_3 Transparency used (Form XObject with transparency group).
72e_PDFA4_4 Transparency used (Blend mode is not 'Normal').
73e_PDFA4_5 Transparency used ('CA' value is not 1.0).
74e_PDFA4_6 Transparency used ('ca' value is not 1.0).
75e_PDFA5_2_1 Unknown annotation type.
76e_PDFA5_2_2 FileAttachment annotation is not permitted.
77e_PDFA5_2_3 Sound annotation is not permitted.
78e_PDFA5_2_4 Movie annotation is not permitted.
79e_PDFA5_2_5 Redact annotation is not permitted.
80e_PDFA5_2_6 3D annotation is not permitted.
81e_PDFA5_2_7 Caret annotation is not permitted.
82e_PDFA5_2_8 Watermark annotation is not permitted.
83e_PDFA5_2_9 Polygon annotation is not permitted.
84e_PDFA5_2_10 PolyLine annotation is not permitted.
85e_PDFA5_2_11 Screen annotation is not permitted.
86e_PDFA5_3_1 An annotation dictionary contains the CA key with a value other than 1.0.
87e_PDFA5_3_2_1 An annotation dictionary is missing F key.
88e_PDFA5_3_2_2 An annotation's 'Print' flag is not set
89e_PDFA5_3_2_3 An annotation's 'Hidden' flag is set.
90e_PDFA5_3_2_4 An annotation's 'Invisible' flag is set.
91e_PDFA5_3_2_5 An annotation's 'NoView' flag is set.
92e_PDFA5_3_3_1 An annotation's C entry present but no OutputIntent present
93e_PDFA5_3_3_2 An annotation's C entry present but OutputIntent has non-RGB destination profile
94e_PDFA5_3_3_3 An annotation's IC entry present but no OutputIntent present
95e_PDFA5_3_3_4 An annotation's IC entry present and OutputIntent has non-RGB destination profile
96e_PDFA5_3_4_1 An annotation AP dictionary has entries other than the N entry.
97e_PDFA5_3_4_2 An annotation AP dictionary does not contain N entry
98e_PDFA5_3_4_3 AP has an N entry whose value is not a stream
99e_PDFA6_1_1 Contains an action type that is not permitted.
100e_PDFA6_1_2 Contains a non-predefined Named action.
101e_PDFA6_2_1 The document catalog dictionary contains AA entry.
102e_PDFA6_2_2 Contains the JavaScript key.
103e_PDFA6_2_3 Invalid destination.
104e_PDFA7_2_1 The document catalog does not contain Metadata stream.
105e_PDFA7_2_2 The Metadata object stream contains Filter key.
106e_PDFA7_2_3 The XMP Metadata stream is not valid.
107e_PDFA7_2_4 XMP property not predefined and no extension schema present.
108e_PDFA7_2_5 XMP not included in 'xpacket'.
109e_PDFA7_3_1 Document information entry 'Title' not synchronized with XMP.
110e_PDFA7_3_2 Document information entry 'Author' not synchronized with XMP.
111e_PDFA7_3_3 Document information entry 'Subject' not synchronized with XMP.
112e_PDFA7_3_4 Document information entry 'Keywords' not synchronized with XMP.
113e_PDFA7_3_5 Document information entry 'Creator' not synchronized with XMP.
114e_PDFA7_3_6 Document information entry 'Producer' not synchronized with XMP.
115e_PDFA7_3_7 Document information entry 'CreationDate' not synchronized with XMP.
116e_PDFA7_3_8 Document information entry 'ModDate' not synchronized with XMP.
117e_PDFA7_3_9 Wrong value type for predefined XMP property.
118e_PDFA7_5_1 'bytes' and 'encoding' attributes are allowed in the header of an XMP packet.
119e_PDFA7_8_1 XMP Extension schema doesn't have a description.
120e_PDFA7_8_2 XMP Extension schema is not valid. Required property 'namespaceURI' might be missing in PDF/A Schema value Type.
121e_PDFA7_8_3 'pdfaExtension:schemas' not found.
122e_PDFA7_8_4 'pdfaExtension:schemas' is using a wrong value type.
123e_PDFA7_8_5 'pdfaExtension:property' not found.
124e_PDFA7_8_6 'pdfaExtension:property' is using a wrong value type.
125e_PDFA7_8_7 'pdfaProperty:name' not found.
126e_PDFA7_8_8 'pdfaProperty:name' is using a wrong value type.
127e_PDFA7_8_9 A description for a property is missing in 'pdfaSchema:property' sequence.
128e_PDFA7_8_10 'pdfaProperty:valueType' not found.
129e_PDFA7_8_11 The required namespace prefix for extension schema is 'pdfaExtension'.
130e_PDFA7_8_12 The required field namespace prefix is 'pdfaSchema'.
131e_PDFA7_8_13 The required field namespace prefix is 'pdfaProperty'.
132e_PDFA7_8_14 The required field namespace prefix is 'pdfaType'.
133e_PDFA7_8_15 The required field namespace prefix is 'pdfaField'.
134e_PDFA7_8_16 'pdfaSchema:valueType' not found.
135e_PDFA7_8_17 'pdfaSchema:valueType' is using a wrong value type.
136e_PDFA7_8_18 Required property 'valueType' missing in PDF/A Schema Value Type.
137e_PDFA7_8_19 'pdfaType:type' not found.
138e_PDFA7_8_20 'pdfaType:type' is using a wrong value type.
139e_PDFA7_8_21 'pdfaType:description' not found.
140e_PDFA7_8_22 'pdfaType:namespaceURI' not found.
141e_PDFA7_8_23 'pdfaType:field' is using a wrong value type.
142e_PDFA7_8_24 'pdfaField:name' not found.
143e_PDFA7_8_25 'pdfaField:name' is using a wrong value type.
144e_PDFA7_8_26 'pdfaField:valueType' not found.
145e_PDFA7_8_27 'pdfaField:valueType' is using a wrong type.
146e_PDFA7_8_28 'pdfaField:description' not found.
147e_PDFA7_8_29 'pdfaField:description' is using a wrong type.
148e_PDFA7_8_30 Required description for 'pdfaField::valueType' is missing.
149e_PDFA7_8_31 A property doesn't match its custom schema type.
150e_PDFA7_11_1 Missing PDF/A identifier.
151e_PDFA7_11_2 Invalid PDF/A identifier namespace
152e_PDFA7_11_3 Invalid PDF/A conformance level.
153e_PDFA7_11_4 Invalid PDF/A part number.
154e_PDFA7_11_5 Invalid PDF/A amendment identifier.
155e_PDFA9_1 An interactive form field contains an action.
156e_PDFA9_2 The NeedAppearances flag in the interactive form dictionary is set to true.

4.2.2 PDF/A Level A Validation Errors

The following table is a non-exhaustive list of checks and conversions performed by PDF/A Manager for Level A Validation:

sh

1Error Code Description
2---------------- ----------------------------------------------------------------------------------------------------------------------------
3e_PDFA3_8_1 The font dictionary is missing 'ToUnicode' entry and additional font requirements for are not met.
4e_PDFA8_2_2 The PDF is not marked as Tagged PDF.
5e_PDFA8_3_3_1 Bad StructTreeRoot
6e_PDFA8_3_3_2 Each structure element dictionary in the structure hierarchy must have a Type entry with the name value of StructElem.
7e_PDFA8_3_4_1 A non-standard structure type does not map to a standard type.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales