iText 7 7.2.0 API
iText.Pdfa.Checker.PdfAChecker Class Referenceabstract

An abstract class that will run through all necessary checks defined in the different PDF/A standards and levels. More...

Inheritance diagram for iText.Pdfa.Checker.PdfAChecker:
iText.Pdfa.Checker.PdfA1Checker iText.Pdfa.Checker.PdfA2Checker iText.Pdfa.Checker.PdfA3Checker

Public Member Functions

virtual void  CheckDocument (PdfCatalog catalog)
  This method checks a number of document-wide requirements of the PDF/A standard. More...
 
virtual void  CheckSinglePage (PdfPage page)
  This method checks all requirements that must be fulfilled by a page in a PDF/A document. More...
 
virtual void  CheckPdfObject (PdfObject obj)
  This method checks the requirements that must be fulfilled by a COS object in a PDF/A document. More...
 
virtual PdfAConformanceLevel  GetConformanceLevel ()
  Gets the iText.Kernel.Pdf.PdfAConformanceLevel for this file. More...
 
virtual bool  IsFullCheckMode ()
  In full check mode all objects will be tested for ISO conformance. More...
 
virtual void  SetFullCheckMode (bool fullCheckMode)
  In full check mode all objects will be tested for ISO conformance. More...
 
virtual bool  ObjectIsChecked (PdfObject @object)
  Remembers which objects have already been checked, in order to avoid redundant checks. More...
 
virtual void  CheckTagStructureElement (PdfObject obj)
  This method checks compliance of the tag structure elements, such as struct elements or parent tree entries. More...
 
abstract void  CheckCanvasStack (char stackOperation)
  This method checks compliance with the graphics state architectural limitation, explained by maxGsStackDepth. More...
 
abstract void  CheckInlineImage (PdfStream inlineImage, PdfDictionary currentColorSpaces)
  This method checks compliance with the inline image restrictions in the PDF/A specs, specifically filter parameters. More...
 
abstract void  CheckColor (Color color, PdfDictionary currentColorSpaces, bool? fill, PdfStream contentStream)
  This method checks compliance with the color restrictions imposed by the available color spaces in the document. More...
 
abstract void  CheckColorSpace (PdfColorSpace colorSpace, PdfDictionary currentColorSpaces, bool checkAlternate, bool? fill)
  This method performs a range of checks on the given color space, depending on the type and properties of that color space. More...
 
abstract void  CheckRenderingIntent (PdfName intent)
  Checks whether the rendering intent of the document is within the allowed range of intents. More...
 
abstract void  CheckFontGlyphs (PdfFont font, PdfStream contentStream)
  Performs a check of the each font glyph as a Form XObject. More...
 
abstract void  CheckExtGState (CanvasGraphicsState extGState, PdfStream contentStream)
  Performs a number of checks on the graphics state, among others ISO 19005-1 section 6.2.8 and 6.4 and ISO 19005-2 section 6.2.5 and 6.2.10. More...
 
abstract void  CheckFont (PdfFont pdfFont)
  Performs a number of checks on the font. More...
 
abstract void  CheckXrefTable (PdfXrefTable xrefTable)
  Verify the conformity of the cross-reference table. More...
 

Static Public Attributes

const String  ICC_COLOR_SPACE_RGB = "RGB "
  The Red-Green-Blue color profile as defined by the International Color Consortium. More...
 
const String  ICC_COLOR_SPACE_CMYK = "CMYK"
  The Cyan-Magenta-Yellow-Key (black) color profile as defined by the International Color Consortium. More...
 
const String  ICC_COLOR_SPACE_GRAY = "GRAY"
  The Grayscale color profile as defined by the International Color Consortium. More...
 
const String  ICC_DEVICE_CLASS_OUTPUT_PROFILE = "prtr"
  The Output device class More...
 
const String  ICC_DEVICE_CLASS_MONITOR_PROFILE = "mntr"
  The Monitor device class More...
 
const int  maxGsStackDepth = 28
  The maximum Graphics State stack depth in PDF/A documents, i.e. the maximum number of graphics state operators with code q that may be opened (i.e. not yet closed by a corresponding Q) at any point in a content stream sequence. More...
 

Detailed Description

An abstract class that will run through all necessary checks defined in the different PDF/A standards and levels.

An abstract class that will run through all necessary checks defined in the different PDF/A standards and levels. A number of common checks are executed in this class, while standard-dependent specifications are implemented in the available subclasses. The standard that is followed is the series of ISO 19005 specifications, currently generations 1 through 3. The ZUGFeRD standard is derived from ISO 19005-3. While it is possible to subclass this method and implement its abstract methods in client code, this is not encouraged and will have little effect. It is not possible to plug custom implementations into iText, because iText should always refuse to create non-compliant PDF/A, which would be possible with client code implementations. Any future generations of the PDF/A standard and its derivates will get their own implementation in the iText 7 - pdfa project.

Member Function Documentation

◆ CheckCanvasStack()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckCanvasStack ( char  stackOperation )
pure virtual

This method checks compliance with the graphics state architectural limitation, explained by maxGsStackDepth.

Parameters
stackOperation the operation to check the graphics state counter for

Implemented in iText.Pdfa.Checker.PdfA1Checker.

◆ CheckColor()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckColor ( Color  color,
PdfDictionary  currentColorSpaces,
bool?  fill,
PdfStream  contentStream 
)
pure virtual

This method checks compliance with the color restrictions imposed by the available color spaces in the document.

This method checks compliance with the color restrictions imposed by the available color spaces in the document. This method will be abstract in update 7.2

Parameters
color the color to check
currentColorSpaces a iText.Kernel.Pdf.PdfDictionary containing the color spaces used in the document
fill whether the color is used for fill or stroke operations
contentStream current content stream

Implemented in iText.Pdfa.Checker.PdfA1Checker, and iText.Pdfa.Checker.PdfA2Checker.

◆ CheckColorSpace()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckColorSpace ( PdfColorSpace  colorSpace,
PdfDictionary  currentColorSpaces,
bool  checkAlternate,
bool?  fill 
)
pure virtual

This method performs a range of checks on the given color space, depending on the type and properties of that color space.

Parameters
colorSpace the color space to check
currentColorSpaces a iText.Kernel.Pdf.PdfDictionary containing the color spaces used in the document
checkAlternate whether or not to also check the parent color space
fill whether the color space is used for fill or stroke operations

Implemented in iText.Pdfa.Checker.PdfA2Checker, and iText.Pdfa.Checker.PdfA1Checker.

◆ CheckDocument()

virtual void iText.Pdfa.Checker.PdfAChecker.CheckDocument ( PdfCatalog  catalog )
inlinevirtual

This method checks a number of document-wide requirements of the PDF/A standard.

This method checks a number of document-wide requirements of the PDF/A standard. The algorithms of some of these checks vary with the PDF/A level and thus are implemented in subclasses; others are implemented as private methods in this class.

Parameters
catalog The catalog being checked

◆ CheckExtGState()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckExtGState ( CanvasGraphicsState  extGState,
PdfStream  contentStream 
)
pure virtual

Performs a number of checks on the graphics state, among others ISO 19005-1 section 6.2.8 and 6.4 and ISO 19005-2 section 6.2.5 and 6.2.10.

Performs a number of checks on the graphics state, among others ISO 19005-1 section 6.2.8 and 6.4 and ISO 19005-2 section 6.2.5 and 6.2.10. This method will be abstract in the update 7.2

Parameters
extGState the graphics state to be checked
contentStream current content stream

Implemented in iText.Pdfa.Checker.PdfA2Checker, and iText.Pdfa.Checker.PdfA1Checker.

◆ CheckFont()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckFont ( PdfFont  pdfFont )
pure virtual

Performs a number of checks on the font.

Performs a number of checks on the font. See ISO 19005-1 section 6.3, ISO 19005-2 and ISO 19005-3 section 6.2.11. Be aware that not all constraints defined in the ISO are checked in this method, for most of them we consider that iText always creates valid fonts.

Parameters
pdfFont font to be checked

Implemented in iText.Pdfa.Checker.PdfA1Checker.

◆ CheckFontGlyphs()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckFontGlyphs ( PdfFont  font,
PdfStream  contentStream 
)
pure virtual

Performs a check of the each font glyph as a Form XObject.

Performs a check of the each font glyph as a Form XObject. See ISO 19005-2 Annex A.5. This only applies to type 3 fonts. This method will be abstract in update 7.2

Parameters
font

iText.Kernel.Font.PdfFont to be checked

Parameters
contentStream stream containing checked font

Implemented in iText.Pdfa.Checker.PdfA2Checker, and iText.Pdfa.Checker.PdfA1Checker.

◆ CheckInlineImage()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckInlineImage ( PdfStream  inlineImage,
PdfDictionary  currentColorSpaces 
)
pure virtual

This method checks compliance with the inline image restrictions in the PDF/A specs, specifically filter parameters.

Parameters
inlineImage a iText.Kernel.Pdf.PdfStream containing the inline image
currentColorSpaces a iText.Kernel.Pdf.PdfDictionary containing the color spaces used in the document

Implemented in iText.Pdfa.Checker.PdfA1Checker, and iText.Pdfa.Checker.PdfA2Checker.

◆ CheckPdfObject()

virtual void iText.Pdfa.Checker.PdfAChecker.CheckPdfObject ( PdfObject  obj )
inlinevirtual

This method checks the requirements that must be fulfilled by a COS object in a PDF/A document.

Parameters
obj the COS object that must be checked

◆ CheckRenderingIntent()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckRenderingIntent ( PdfName  intent )
pure virtual

Checks whether the rendering intent of the document is within the allowed range of intents.

Checks whether the rendering intent of the document is within the allowed range of intents. This is defined in ISO 19005-1 section 6.2.9, and unchanged in newer generations of the PDF/A specification.

Parameters
intent the intent to be analyzed

Implemented in iText.Pdfa.Checker.PdfA1Checker.

◆ CheckSinglePage()

virtual void iText.Pdfa.Checker.PdfAChecker.CheckSinglePage ( PdfPage  page )
inlinevirtual

This method checks all requirements that must be fulfilled by a page in a PDF/A document.

Parameters
page the page that must be checked

◆ CheckTagStructureElement()

virtual void iText.Pdfa.Checker.PdfAChecker.CheckTagStructureElement ( PdfObject  obj )
inlinevirtual

This method checks compliance of the tag structure elements, such as struct elements or parent tree entries.

Parameters
obj an object that represents tag structure element.

◆ CheckXrefTable()

abstract void iText.Pdfa.Checker.PdfAChecker.CheckXrefTable ( PdfXrefTable  xrefTable )
pure virtual

Verify the conformity of the cross-reference table.

Parameters
xrefTable is the Xref table

Implemented in iText.Pdfa.Checker.PdfA1Checker.

◆ GetConformanceLevel()

virtual PdfAConformanceLevel iText.Pdfa.Checker.PdfAChecker.GetConformanceLevel ( )
inlinevirtual

Gets the iText.Kernel.Pdf.PdfAConformanceLevel for this file.

Returns
the defined conformance level for this document.

◆ IsFullCheckMode()

virtual bool iText.Pdfa.Checker.PdfAChecker.IsFullCheckMode ( )
inlinevirtual

In full check mode all objects will be tested for ISO conformance.

In full check mode all objects will be tested for ISO conformance. If full check mode is switched off objects which were not modified might be skipped to speed up the validation of the document

Returns
true if full check mode is switched on
See also
iText.Kernel.Pdf.PdfObject.IsModified()

◆ ObjectIsChecked()

virtual bool iText.Pdfa.Checker.PdfAChecker.ObjectIsChecked ( PdfObject object )
inlinevirtual

Remembers which objects have already been checked, in order to avoid redundant checks.

Parameters
object the object to check
Returns
whether or not the object has already been checked

◆ SetFullCheckMode()

virtual void iText.Pdfa.Checker.PdfAChecker.SetFullCheckMode ( bool  fullCheckMode )
inlinevirtual

In full check mode all objects will be tested for ISO conformance.

In full check mode all objects will be tested for ISO conformance. If full check mode is switched off objects which were not modified might be skipped to speed up the validation of the document

Parameters
fullCheckMode is a new value for full check mode switcher
See also
iText.Kernel.Pdf.PdfObject.IsModified()

Member Data Documentation

◆ ICC_COLOR_SPACE_CMYK

const String iText.Pdfa.Checker.PdfAChecker.ICC_COLOR_SPACE_CMYK = "CMYK"
static

The Cyan-Magenta-Yellow-Key (black) color profile as defined by the International Color Consortium.

◆ ICC_COLOR_SPACE_GRAY

const String iText.Pdfa.Checker.PdfAChecker.ICC_COLOR_SPACE_GRAY = "GRAY"
static

The Grayscale color profile as defined by the International Color Consortium.

◆ ICC_COLOR_SPACE_RGB

const String iText.Pdfa.Checker.PdfAChecker.ICC_COLOR_SPACE_RGB = "RGB "
static

The Red-Green-Blue color profile as defined by the International Color Consortium.

◆ ICC_DEVICE_CLASS_MONITOR_PROFILE

const String iText.Pdfa.Checker.PdfAChecker.ICC_DEVICE_CLASS_MONITOR_PROFILE = "mntr"
static

The Monitor device class

◆ ICC_DEVICE_CLASS_OUTPUT_PROFILE

const String iText.Pdfa.Checker.PdfAChecker.ICC_DEVICE_CLASS_OUTPUT_PROFILE = "prtr"
static

The Output device class

◆ maxGsStackDepth

const int iText.Pdfa.Checker.PdfAChecker.maxGsStackDepth = 28
static

The maximum Graphics State stack depth in PDF/A documents, i.e. the maximum number of graphics state operators with code q that may be opened (i.e. not yet closed by a corresponding Q) at any point in a content stream sequence.

The maximum Graphics State stack depth in PDF/A documents, i.e. the maximum number of graphics state operators with code q that may be opened (i.e. not yet closed by a corresponding Q) at any point in a content stream sequence. Defined as 28 by PDF/A-1 section 6.1.12, by referring to the PDF spec Appendix C table 1 "architectural limits".