All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::PDFA::PDFACompliance Class Reference

#include <PDFACompliance.h>

Public Types

enum  Conformance {
  e_NoConformance = 0, e_Level1A, e_Level1B, e_Level2A,
  e_Level2B, e_Level2U, e_Level3A, e_Level3B,
  e_Level3U
}
 
enum  ErrorCode {
  e_PDFA0_1_0 =10, e_PDFA0_1_1 =11, e_PDFA0_1_2 =12, e_PDFA0_1_3 =13,
  e_PDFA0_1_4 =14, e_PDFA0_1_5 =15, e_PDFA1_2_1 =121, e_PDFA1_2_2 =122,
  e_PDFA1_3_1 =131, e_PDFA1_3_2 =132, e_PDFA1_3_3 =133, e_PDFA1_3_4 =134,
  e_PDFA1_4_1 =141, e_PDFA1_4_2 =142, e_PDFA1_6_1 =161, e_PDFA1_7_1 =171,
  e_PDFA1_7_2 =172, e_PDFA1_7_3 =173, e_PDFA1_7_4 =174, e_PDFA1_8_1 =181,
  e_PDFA1_8_2 =182, e_PDFA1_8_3 =183, e_PDFA1_8_4 =184, e_PDFA1_8_5 =185,
  e_PDFA1_8_6 =186, e_PDFA1_8_7 = 187, e_PDFA1_10_1 =1101, e_PDFA1_11_1 =1111,
  e_PDFA1_11_2 =1112, e_PDFA1_12_1 =1121, e_PDFA1_12_2 =1122, e_PDFA1_12_3 =1123,
  e_PDFA1_12_4 =1124, e_PDFA1_12_5 =1125, e_PDFA1_12_6 =1126, e_PDFA1_13_1 =1131,
  e_PDFA2_2_1 =221, e_PDFA2_3_2 =232, e_PDFA2_3_3 =233, e_PDFA2_3_3_1 =2331,
  e_PDFA2_3_3_2 =2332, e_PDFA2_3_4_1 =2341, e_PDFA2_4_1 =241, e_PDFA2_4_2 =242,
  e_PDFA2_4_3 =243, e_PDFA2_4_4 =244, e_PDFA2_5_1 =251, e_PDFA2_5_2 =252,
  e_PDFA2_6_1 =261, e_PDFA2_7_1 =271, e_PDFA2_8_1 =281, e_PDFA2_9_1 =291,
  e_PDFA2_10_1 =2101, e_PDFA3_2_1 =321, e_PDFA3_3_1 =331, e_PDFA3_3_2 =332,
  e_PDFA3_3_3_1 =3331, e_PDFA3_3_3_2 =3332, e_PDFA3_4_1 =341, e_PDFA3_5_1 =351,
  e_PDFA3_5_2 =352, e_PDFA3_5_3 =353, e_PDFA3_5_4 =354, e_PDFA3_5_5 =355,
  e_PDFA3_5_6 =356, e_PDFA3_6_1 =361, e_PDFA3_7_1 =371, e_PDFA3_7_2 =372,
  e_PDFA3_7_3 =373, e_PDFA4_1 =41, e_PDFA4_2 =42, e_PDFA4_3 =43,
  e_PDFA4_4 =44, e_PDFA4_5 =45, e_PDFA4_6 =46, e_PDFA5_2_1 =521,
  e_PDFA5_2_2 =522, e_PDFA5_2_3 =523, e_PDFA5_2_4 =524, e_PDFA5_2_5 =525,
  e_PDFA5_2_6 =526, e_PDFA5_2_7 =527, e_PDFA5_2_8 =528, e_PDFA5_2_9 =529,
  e_PDFA5_2_10 =5210, e_PDFA5_2_11 =5211, e_PDFA5_3_1 =531, e_PDFA5_3_2_1 =5321,
  e_PDFA5_3_2_2 =5322, e_PDFA5_3_2_3 =5323, e_PDFA5_3_2_4 =5324, e_PDFA5_3_2_5 =5325,
  e_PDFA5_3_3_1 =5331, e_PDFA5_3_3_2 =5332, e_PDFA5_3_3_3 =5333, e_PDFA5_3_3_4 =5334,
  e_PDFA5_3_4_0 =5340, e_PDFA5_3_4_1 =5341, e_PDFA5_3_4_2 =5342, e_PDFA5_3_4_3 =5343,
  e_PDFA6_1_1 =611, e_PDFA6_1_2 =612, e_PDFA6_2_1 =621, e_PDFA6_2_2 = 622,
  e_PDFA6_2_3 = 623, e_PDFA7_2_1 =721, e_PDFA7_2_2 =722, e_PDFA7_2_3 =723,
  e_PDFA7_2_4 =724, e_PDFA7_2_5 =725, e_PDFA7_3_1 =731, e_PDFA7_3_2 =732,
  e_PDFA7_3_3 =733, e_PDFA7_3_4 =734, e_PDFA7_3_5 =735, e_PDFA7_3_6 =736,
  e_PDFA7_3_7 =737, e_PDFA7_3_8 =738, e_PDFA7_3_9 =739, e_PDFA7_5_1 =751,
  e_PDFA7_8_1 =781, e_PDFA7_8_2 =782, e_PDFA7_8_3 =783, e_PDFA7_8_4 =784,
  e_PDFA7_8_5 =785, e_PDFA7_8_6 =786, e_PDFA7_8_7 =787, e_PDFA7_8_8 =788,
  e_PDFA7_8_9 =789, e_PDFA7_8_10 =7810, e_PDFA7_8_11 =7811, e_PDFA7_8_12 =7812,
  e_PDFA7_8_13 =7813, e_PDFA7_8_14 =7814, e_PDFA7_8_15 =7815, e_PDFA7_8_16 =7816,
  e_PDFA7_8_17 =7817, e_PDFA7_8_18 = 7818, e_PDFA7_8_19 = 7819, e_PDFA7_8_20 =7820,
  e_PDFA7_8_21 =7821, e_PDFA7_8_22 =7822, e_PDFA7_8_23 =7823, e_PDFA7_8_24 =7824,
  e_PDFA7_8_25 =7825, e_PDFA7_8_26 =7826, e_PDFA7_8_27 =7827, e_PDFA7_8_28 =7828,
  e_PDFA7_8_29 =7829, e_PDFA7_8_30 =7830, e_PDFA7_8_31 =7831, e_PDFA7_11_1 =7111,
  e_PDFA7_11_2 =7112, e_PDFA7_11_3 =7113, e_PDFA7_11_4 =7114, e_PDFA7_11_5 =7115,
  e_PDFA9_1 =91, e_PDFA9_2 =92, e_PDFA9_3 =93, e_PDFA9_4 =94,
  e_PDFA3_8_1 =381, e_PDFA8_2_2 =822, e_PDFA8_3_3_1 =8331, e_PDFA8_3_3_2 =8332,
  e_PDFA8_3_4_1 =8341, e_PDFA1_2_3 =123, e_PDFA1_10_2 =1102, e_PDFA1_10_3 =1103,
  e_PDFA1_12_10 =11210, e_PDFA1_13_5 =1135, e_PDFA2_3_10 =2310, e_PDFA2_4_2_10 =24220,
  e_PDFA2_4_2_11 =24221, e_PDFA2_4_2_12 =24222, e_PDFA2_4_2_13 =24223, e_PDFA2_5_10 =2510,
  e_PDFA2_5_11 =2511, e_PDFA2_5_12 =2512, e_PDFA2_8_3_1 =2831, e_PDFA2_8_3_2 =2832,
  e_PDFA2_8_3_3 =2833, e_PDFA2_8_3_4 =2834, e_PDFA2_8_3_5 =2835, e_PDFA2_10_20 =21020,
  e_PDFA2_10_21 =21021, e_PDFA11_0_0 =11000, e_PDFA6_10_0 =6100, e_PDFA6_10_1 =6101,
  e_PDFA6_2_11_5 =62115, e_PDFA6_2_11_6 =62116, e_PDFA6_2_11_7 =62117, e_PDFA6_2_11_8 =62118,
  e_PDFA6_9_1 =69001, e_PDFA6_9_3 =69003, e_PDFA8_1 =81, e_PDFA_3E1 =1,
  e_PDFA_3E1_1 =101, e_PDFA_3E2 =2, e_PDFA_3E3 =3, e_PDFA_LAST
}
 

Public Member Functions

 PDFACompliance (bool convert, const UString &file_path, const char *password=0, Conformance conf=e_Level1B, ErrorCode *exceptions=0, int num_exceptions=0, int max_ref_objs=10, bool first_stop=false)
 
 PDFACompliance (bool convert, const char *buf, size_t buf_size, const char *password=0, Conformance conf=e_Level1B, ErrorCode *exceptions=0, int num_exceptions=0, int max_ref_objs=10, bool first_stop=false)
 
void SaveAs (const UString &file_path, bool linearized=false)
 
std::vector< unsigned char > SaveAs (bool linearized=false)
 
void SaveAs (const char *&out_buf, size_t &out_buf_size, bool linearized=false)
 
size_t GetErrorCount ()
 
PDFACompliance::ErrorCode GetError (size_t idx)
 
size_t GetRefObjCount (ErrorCode id)
 
size_t GetRefObj (ErrorCode id, size_t err_idx)
 
 ~PDFACompliance ()
 
void Destroy ()
 
 PDFACompliance (TRN_PDFACompliance impl)
 

Static Public Member Functions

static const char * GetPDFAErrorMessage (ErrorCode id)
 

Public Attributes

TRN_PDFACompliance mp_pdfac
 

Detailed Description

PDFACompliance class is used to validate PDF documents for PDF/A (ISO 19005:1/2/3) compliance or to convert existing PDF files to PDF/A compliant documents.

The conversion option 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. Because the conversion process applies only necessary changes to the source file, the information loss is minimal. Also, because the converter provides a detailed report for each change, it is simple to inspect changes and to determine whether the conversion loss is acceptable.

The validation option in PDF/A Manager can be used to quickly determine whether a PDF file fully complies with the PDF/A specification according to the international standard ISO 19005:1/2/3. For files that are not compliant, the validation option can be used to produce a detailed report of compliance violations as well as a list of relevant error objects.

Key Functions:

  • Checks if a PDF file is compliant with PDF/A (ISO 19005:1/2/3) specification.
  • Converts any PDF to a PDF/A compliant document.
  • Supports PDF/A-1a, PDF/A-1b, PDF/A-2b
  • Produces a detailed report of compliance violations and associated PDF objects.
  • Keeps the required changes a minimum, preserving the consistency of the original.
  • Tracks all changes to allow for automatic assessment of data loss.
  • Allows user to customize compliance checks or omit specific changes.
  • Preserves tags, logical structure, and color information in existing PDF documents.
  • Offers automatic font substitution, embedding, and subsetting options.
  • Supports automation and batch operation. PDF/A Converter is designed to be used in unattended mode in high throughput server or batch environments

Definition at line 51 of file PDFACompliance.h.

Member Enumeration Documentation

PDF/A Conformance Level (19005:1/2/3).

Level A conforming files must adhere to all of the requirements of ISO 19005. A file meeting this conformance level is said to be a 'conforming PDF/A -1a file.'

Level B conforming files shall adhere to all of the requirements of ISO 19005 except those of 6.3.8 and 6.8. A file meeting this conformance level is said to be a 'conforming PDF/A-1b file'. The Level B conformance requirements are intended to be those minimally necessary to ensure that the rendered visual appearance of a conforming file is preservable over the long term.

Enumerator
e_NoConformance 
e_Level1A 
e_Level1B 
e_Level2A 
e_Level2B 
e_Level2U 
e_Level3A 
e_Level3B 
e_Level3U 

Definition at line 67 of file PDFACompliance.h.

Enumerator
e_PDFA0_1_0 

Invalid PDF structure.

e_PDFA0_1_1 

Corrupt document.

e_PDFA0_1_2 

Corrupt content stream.

e_PDFA0_1_3 

Using JPEG2000 compression (PDF 1.4 compatibility).

e_PDFA0_1_4 

Contains compressed object streams (PDF 1.4 compatibility).

e_PDFA0_1_5 

Contains cross-reference streams (PDF 1.4 compatibility).

e_PDFA1_2_1 

Document does not start with % character.

e_PDFA1_2_2 

File header line not followed by % and 4 characters > 127.

e_PDFA1_3_1 

The trailer dictionary does not contain ID.

e_PDFA1_3_2 

Trailer dictionary contains Encrypt.

e_PDFA1_3_3 

Data after last EOF marker.

e_PDFA1_3_4 

Linearized file: ID in 1st page and last trailer are different.

e_PDFA1_4_1 

Subsection header: starting object number and range not separated by a single space.

e_PDFA1_4_2 

'xref' and cross reference subsection header not separated by a single EOL marker.

e_PDFA1_6_1 

Invalid hexadecimal strings used.

e_PDFA1_7_1 

The 'stream' token is not followed by CR and LF or a single LF.

e_PDFA1_7_2 

The 'endstream' token is not preceded by EOL.

e_PDFA1_7_3 

The value of Length does not match the number of bytes.

e_PDFA1_7_4 

A stream object dictionary contains the F, FFilter, or FDecodeParms keys.

e_PDFA1_8_1 

Object number and generation number are not separated by a single white-space.

e_PDFA1_8_2 

Generation number and 'obj' are not separated by a single white-space.

e_PDFA1_8_3 

Object number not preceded by EOL marker.

e_PDFA1_8_4 

'endobj' not preceded by EOL marker

e_PDFA1_8_5 

'obj' not followed by EOL marker

e_PDFA1_8_6 

'endobj' not followed by EOL marker

e_PDFA1_8_7 

Invalid UTF8 string.

e_PDFA1_10_1 

Using LZW compression.

e_PDFA1_11_1 

A file specification dictionary contains a non-compliant embedded file (EF key).

e_PDFA1_11_2 

Contains the EmbeddedFiles key.

e_PDFA1_12_1 

Array contains more than 8191 elements.

e_PDFA1_12_2 

Dictionary contains more than 4095 elements.

e_PDFA1_12_3 

Name with more than 127 bytes.

e_PDFA1_12_4 

Contains an integer value outside of the allowed range [-2^31, 2^31-1],.

e_PDFA1_12_5 

Exceeds the maximum number (8,388,607) of indirect objects in a PDF file.

e_PDFA1_12_6 

The number of nested q/Q operators is greater than 28.

e_PDFA1_13_1 

Optional content (layers) not allowed.

e_PDFA2_2_1 

DestOutputProfile-s in OutputIntents array do not match.

e_PDFA2_3_2 

Not a valid ICC color profile.

e_PDFA2_3_3 

The N entry does not match the number of color components in the embedded ICC profile.

e_PDFA2_3_3_1 

Device-specific color space used, but no GTS_PDFA1 OutputIntent.

e_PDFA2_3_3_2 

Device-specific color space, does not match OutputIntent.

e_PDFA2_3_4_1 

Device-specific color space used in an alternate color space.

e_PDFA2_4_1 

Image with Alternates key.

e_PDFA2_4_2 

Image with OPI key.

e_PDFA2_4_3 

Image with invalid rendering intent.

e_PDFA2_4_4 

Image with Interpolate key set to true.

e_PDFA2_5_1 

XObject with OPI key.

e_PDFA2_5_2 

PostScript XObject.

e_PDFA2_6_1 

Contains a reference XObject.

e_PDFA2_7_1 

Contains an XObject that is not supported (e.g. PostScript XObject).

e_PDFA2_8_1 

Contains an invalid Transfer Curve in the extended graphics state.

e_PDFA2_9_1 

Use of an invalid rendering intent.

e_PDFA2_10_1 

Illegal operator.

e_PDFA3_2_1 

Embedded font is damaged.

e_PDFA3_3_1 

Incompatible CIDSystemInfo entries.

e_PDFA3_3_2 

Type 2 CIDFont without CIDToGIDMap.

e_PDFA3_3_3_1 

CMap not embedded.

e_PDFA3_3_3_2 

Inconsistent WMode in embedded CMap dictionary and stream.

e_PDFA3_4_1 

The font is not embedded.

e_PDFA3_5_1 

Embedded composite (Type0) font program does not define all font glyphs.

e_PDFA3_5_2 

Embedded Type1 font program does not define all font glyphs.

e_PDFA3_5_3 

Embedded TrueType font program does not define all font glyphs.

e_PDFA3_5_4 

The font descriptor dictionary does not include a CIDSet stream for CIDFont subset.

e_PDFA3_5_5 

The font descriptor dictionary does not include a CharSet string for Type1 font subset.

e_PDFA3_5_6 

CIDSet in subset font is incomplete.

e_PDFA3_6_1 

Widths in embedded font are inconsistent with /Widths entry in the font dictionary.

e_PDFA3_7_1 

A non-symbolic TrueType font must use WinAnsiEncoding or MacRomanEncoding.

e_PDFA3_7_2 

A symbolic TrueType font must not specify encoding.

e_PDFA3_7_3 

A symbolic TrueType font does not have exactly one entry in cmap table.

e_PDFA4_1 

Transparency used (ExtGState with soft mask).

e_PDFA4_2 

Transparency used (XObject with soft mask).

e_PDFA4_3 

Transparency used (Page or Form XObject with transparency group).

e_PDFA4_4 

Transparency used (Blend mode is not 'Normal').

e_PDFA4_5 

Transparency used ('CA' value is not 1.0).

e_PDFA4_6 

Transparency used ('ca' value is not 1.0).

e_PDFA5_2_1 

Unknown annotation type.

e_PDFA5_2_2 

FileAttachment annotation is not permitted.

e_PDFA5_2_3 

Sound annotation is not permitted.

e_PDFA5_2_4 

Movie annotation is not permitted.

e_PDFA5_2_5 

Redact annotation is not permitted.

e_PDFA5_2_6 

3D annotation is not permitted.

e_PDFA5_2_7 

Caret annotation is not permitted.

e_PDFA5_2_8 

Watermark annotation is not permitted.

e_PDFA5_2_9 

Polygon annotation is not permitted.

e_PDFA5_2_10 

PolyLine annotation is not permitted.

e_PDFA5_2_11 

Screen annotation is not permitted.

e_PDFA5_3_1 

An annotation dictionary contains the CA key with a value other than 1.0.

e_PDFA5_3_2_1 

An annotation dictionary is missing F key.

e_PDFA5_3_2_2 

An annotation's 'Print' flag is not set.

e_PDFA5_3_2_3 

An annotation's 'Hidden' flag is set.

e_PDFA5_3_2_4 

An annotation's 'Invisible' flag is set.

e_PDFA5_3_2_5 

An annotation's 'NoView' flag is set.

e_PDFA5_3_3_1 

An annotation's C entry present but no OutputIntent present.

e_PDFA5_3_3_2 

An annotation's C entry present but OutputIntent has non-RGB destination profile.

e_PDFA5_3_3_3 

An annotation's IC entry present but no OutputIntent present.

e_PDFA5_3_3_4 

An annotation's IC entry present and OutputIntent has non-RGB destination profile.

e_PDFA5_3_4_0 

Annotation is missing AP entry.

e_PDFA5_3_4_1 

An annotation AP dictionary has entries other than the N entry.

e_PDFA5_3_4_2 

An annotation AP dictionary does not contain N entry.

e_PDFA5_3_4_3 

AP has an N entry whose value is invalid.

e_PDFA6_1_1 

Contains an action type that is not permitted.

e_PDFA6_1_2 

Contains a non-predefined Named action.

e_PDFA6_2_1 

The document catalog dictionary contains AA entry.

e_PDFA6_2_2 

Contains the JavaScript key.

e_PDFA6_2_3 

Invalid destination.

e_PDFA7_2_1 

The document catalog does not contain Metadata stream.

e_PDFA7_2_2 

The Metadata object stream contains Filter key.

e_PDFA7_2_3 

The XMP Metadata stream is not valid.

e_PDFA7_2_4 

XMP property not predefined and no extension schema present.

e_PDFA7_2_5 

XMP not included in 'xpacket'.

e_PDFA7_3_1 

Document information entry 'Title' not synchronized with XMP.

e_PDFA7_3_2 

Document information entry 'Author' not synchronized with XMP.

e_PDFA7_3_3 

Document information entry 'Subject' not synchronized with XMP.

e_PDFA7_3_4 

Document information entry 'Keywords' not synchronized with XMP.

e_PDFA7_3_5 

Document information entry 'Creator' not synchronized with XMP.

e_PDFA7_3_6 

Document information entry 'Producer' not synchronized with XMP.

e_PDFA7_3_7 

Document information entry 'CreationDate' not synchronized with XMP.

e_PDFA7_3_8 

Document information entry 'ModDate' not synchronized with XMP.

e_PDFA7_3_9 

Wrong value type for predefined XMP property.

e_PDFA7_5_1 

'bytes' and 'encoding' attributes are allowed in the header of an XMP packet.

e_PDFA7_8_1 

XMP Extension schema doesn't have a description.

e_PDFA7_8_2 

XMP Extension schema is not valid. Required property 'namespaceURI' might be missing in PDF/A Schema value Type.

e_PDFA7_8_3 

'pdfaExtension:schemas' not found.

e_PDFA7_8_4 

'pdfaExtension:schemas' is using a wrong value type.

e_PDFA7_8_5 

'pdfaExtension:property' not found.

e_PDFA7_8_6 

'pdfaExtension:property' is using a wrong value type.

e_PDFA7_8_7 

'pdfaProperty:name' not found.

e_PDFA7_8_8 

'pdfaProperty:name' is using a wrong value type.

e_PDFA7_8_9 

A description for a property is missing in 'pdfaSchema:property' sequence.

e_PDFA7_8_10 

'pdfaProperty:valueType' not found.

e_PDFA7_8_11 

The required namespace prefix for extension schema is 'pdfaExtension'.

e_PDFA7_8_12 

The required field namespace prefix is 'pdfaSchema'.

e_PDFA7_8_13 

The required field namespace prefix is 'pdfaProperty'.

e_PDFA7_8_14 

The required field namespace prefix is 'pdfaType'.

e_PDFA7_8_15 

The required field namespace prefix is 'pdfaField'.

e_PDFA7_8_16 

'pdfaSchema:valueType' not found.

e_PDFA7_8_17 

'pdfaSchema:valueType' is using a wrong value type.

e_PDFA7_8_18 

Required property 'valueType' missing in PDF/A Schema Value Type.

e_PDFA7_8_19 

'pdfaType:type' not found.

e_PDFA7_8_20 

'pdfaType:type' is using a wrong value type.

e_PDFA7_8_21 

'pdfaType:description' not found.

e_PDFA7_8_22 

'pdfaType:namespaceURI' not found.

e_PDFA7_8_23 

'pdfaType:field' is using a wrong value type.

e_PDFA7_8_24 

'pdfaField:name' not found.

e_PDFA7_8_25 

'pdfaField:name' is using a wrong value type.

e_PDFA7_8_26 

'pdfaField:valueType' not found.

e_PDFA7_8_27 

'pdfaField:valueType' is using a wrong type.

e_PDFA7_8_28 

'pdfaField:description' not found.

e_PDFA7_8_29 

'pdfaField:description' is using a wrong type.

e_PDFA7_8_30 

Required description for 'pdfaField::valueType' is missing.

e_PDFA7_8_31 

A property doesn't match its custom schema type.

e_PDFA7_11_1 

Missing PDF/A identifier.

e_PDFA7_11_2 

Invalid PDF/A identifier namespace.

e_PDFA7_11_3 

Invalid PDF/A conformance level.

e_PDFA7_11_4 

Invalid PDF/A part number.

e_PDFA7_11_5 

Invalid PDF/A amendment identifier.

e_PDFA9_1 

An interactive form field contains an action.

e_PDFA9_2 

The NeedAppearances flag in the interactive form dictionary is set to true.

e_PDFA9_3 

AcroForms contains XFA.

e_PDFA9_4 

Catalog contains NeedsRendering.

e_PDFA3_8_1 

The font dictionary is missing 'ToUnicode' entry.

e_PDFA8_2_2 

The PDF is not marked as Tagged PDF.

e_PDFA8_3_3_1 

Bad StructTreeRoot.

e_PDFA8_3_3_2 

Each structure element dictionary in the structure hierarchy must have a Type entry with the name value of StructElem.

e_PDFA8_3_4_1 

A non-standard structure type does not map to a standard type.

e_PDFA1_2_3 

Bad file header.

e_PDFA1_10_2 

Invalid use of Crypt filter.

e_PDFA1_10_3 

Bad stream Filter.

e_PDFA1_12_10 

Bad Permission Dictionary.

e_PDFA1_13_5 

Page dimensions are outside of the allowed range (3-14400).

e_PDFA2_3_10 

Contains DestOutputProfileRef.

e_PDFA2_4_2_10 

OPM is 1.

e_PDFA2_4_2_11 

Incorrect colorant specification in DeviceN.

e_PDFA2_4_2_12 

tintTransform is different in Separations with the same colorant name.

e_PDFA2_4_2_13 

alternateSpace is different in Separations with the same colorant name.

e_PDFA2_5_10 

HTP entry in ExtGState.

e_PDFA2_5_11 

Unsupported HalftoneType.

e_PDFA2_5_12 

Uses HalftoneName key.

e_PDFA2_8_3_1 

JPEG2000: Only the JPX baseline is supported.

e_PDFA2_8_3_2 

JPEG2000: Invalid number of colour channels.

e_PDFA2_8_3_3 

JPEG2000: Invalid color space.

e_PDFA2_8_3_4 

JPEG2000: The bit-depth JPEG2000 data must be in range 1-38.

e_PDFA2_8_3_5 

JPEG2000: All colour channels in the JPEG2000 data must have the same bit-depth.

e_PDFA2_10_20 

Page Group entry is missing in a document without OutputIntent.

e_PDFA2_10_21 

Invalid blend mode.

e_PDFA11_0_0 

Catalog contains Requirements key.

e_PDFA6_10_0 

PresSteps is not allowed.

e_PDFA6_10_1 

AlternatePresentations not allowed.

e_PDFA6_2_11_5 

Some characters map to 0 or FFFE.

e_PDFA6_2_11_6 

Some text can't be mapped to Unicode.

e_PDFA6_2_11_7 

PUA characters are missing ActualText.

e_PDFA6_2_11_8 

Use of .notdef glyph.

e_PDFA6_9_1 

Optional content Missing Name entry.

e_PDFA6_9_3 

Optional content Contains AS entry.

e_PDFA8_1 

FileSpec is missing F or UF key.

e_PDFA_3E1 

Embedded file has no MIME type entry.

e_PDFA_3E1_1 

Embedded file Params has no ModDate entry.

e_PDFA_3E2 

Embedded file has no AFRelationship.

e_PDFA_3E3 

Doc catalog is missing AF entry.

e_PDFA_LAST 

Definition at line 80 of file PDFACompliance.h.

Constructor & Destructor Documentation

pdftron::PDF::PDFA::PDFACompliance::PDFACompliance ( bool  convert,
const UString file_path,
const char *  password = 0,
Conformance  conf = e_Level1B,
ErrorCode exceptions = 0,
int  num_exceptions = 0,
int  max_ref_objs = 10,
bool  first_stop = false 
)

Perform PDF/A validation or PDF/A conversion on the input PDF document.

Parameters
convertA flag used to instruct PDF/A processor to perform PDF/A conversion (if 'true') or PDF/A validation (if 'false'). After PDF/A conversion you can save the resulting document using Save() method(s).
file_path- pathname to the file.
passwordAn optional parameter that can be used to specify the password for encrypted PDF documents (typically only useful in the conversion mode).
confThe PDF conformance level. The default value is e_Level1B.
max_ref_objsThe maximum number of object references per error condition.
Exceptions
Throws an exception if the file can't be opened.
pdftron::PDF::PDFA::PDFACompliance::PDFACompliance ( bool  convert,
const char *  buf,
size_t  buf_size,
const char *  password = 0,
Conformance  conf = e_Level1B,
ErrorCode exceptions = 0,
int  num_exceptions = 0,
int  max_ref_objs = 10,
bool  first_stop = false 
)

Perform PDF/A validation or PDF/A conversion on the input PDF document which is stored in a memory buffer.

Parameters
convertA flag used to instruct PDF/A processor to perform PDF/A conversion (if 'true') or PDF/A validation (if 'false'). After PDF/A conversion you can save the resulting document using Save() method(s).
bufA memory buffer containing the serialized PDF document.
buf_sizeThe size of memory buffer.
passwordAn optional parameter that can be used to specify the password for encrypted PDF documents (typically only useful in the conversion mode).
confThe PDF conformance level. The default value is e_Level1B.
max_ref_objsThe maximum number of object references per error condition.
Exceptions
Throws an exception if the file can't be opened.
pdftron::PDF::PDFA::PDFACompliance::~PDFACompliance ( )

Destructor

pdftron::PDF::PDFA::PDFACompliance::PDFACompliance ( TRN_PDFACompliance  impl)
inline

Definition at line 414 of file PDFACompliance.h.

Member Function Documentation

void pdftron::PDF::PDFA::PDFACompliance::Destroy ( )

Frees the native memory of the object.

PDFACompliance::ErrorCode pdftron::PDF::PDFA::PDFACompliance::GetError ( size_t  idx)
Returns
The error identifier.
Parameters
idxThe index in the array of error code identifiers. The array is indexed starting from zero.
Exceptions
throwsan Exception if the index is outside the array bounds.
size_t pdftron::PDF::PDFA::PDFACompliance::GetErrorCount ( )
Returns
The number of compliance violations.
static const char* pdftron::PDF::PDFA::PDFACompliance::GetPDFAErrorMessage ( ErrorCode  id)
static
Parameters
iderror code identifier (obtained using GetError() method).
Returns
A descriptive error message for the given error identifier.
size_t pdftron::PDF::PDFA::PDFACompliance::GetRefObj ( ErrorCode  id,
size_t  err_idx 
)
Returns
A specific object reference associated with a given error type. The return value is a PDF object identifier (i.e. object number for 'pdftron.SDF.Obj)) for the that is associated with the error.
Parameters
iderror code identifier (obtained using GetError() method).
err_idxThe index in the array of object references. The array is indexed starting from zero.
Exceptions
throwsan Exception if the index is outside the array bounds.
size_t pdftron::PDF::PDFA::PDFACompliance::GetRefObjCount ( ErrorCode  id)
Returns
The number of object references associated with a given error.
Parameters
iderror code identifier (obtained using GetError() method).
void pdftron::PDF::PDFA::PDFACompliance::SaveAs ( const UString file_path,
bool  linearized = false 
)

Serializes the converted PDF/A document to a file on disk.

Note
This method assumes that the first parameter passed in PDFACompliance constructor (i.e. the convert parameter) is set to 'true'.
Parameters
file_path- the output file name.
linearized- An optional flag used to specify whether the the resulting PDF/A document should be web-optimized (linearized).
std::vector<unsigned char> pdftron::PDF::PDFA::PDFACompliance::SaveAs ( bool  linearized = false)

Serializes the converted PDF/A document to a memory buffer.

Note
This method assumes that the first parameter passed in PDFACompliance constructor (i.e. the convert parameter) is set to 'true'.
Parameters
linearized- An optional flag used to specify whether the the resulting PDF/A document should be web-optimized (linearized).
Returns
The converted document saved as a memory buffer.
void pdftron::PDF::PDFA::PDFACompliance::SaveAs ( const char *&  out_buf,
size_t &  out_buf_size,
bool  linearized = false 
)

Serializes the converted PDF/A document to a memory buffer.

Note
This method assumes that the first parameter passed in PDFACompliance constructor (i.e. the convert parameter) is set to 'true'.
Parameters
out_bufa pointer to the buffer containing the serialized version of the document. (C++ Note) The buffer is owned by a PDFACompliance class and the client doesn't need to do any initialization or cleanup.
out_buf_sizethe size of the serialized document (i.e. out_buf) in bytes.
linearized- An optional flag used to specify whether the the resulting PDF/A document should be web-optimized (linearized).

Member Data Documentation

TRN_PDFACompliance pdftron::PDF::PDFA::PDFACompliance::mp_pdfac

Definition at line 415 of file PDFACompliance.h.


The documentation for this class was generated from the following file: