Package com.itextpdf.pdfa.checker
Class PdfA2Checker
java.lang.Object
com.itextpdf.pdfa.checker.PdfAChecker
com.itextpdf.pdfa.checker.PdfA1Checker
com.itextpdf.pdfa.checker.PdfA2Checker
- Direct Known Subclasses:
-
PdfA3Checker
PdfA2Checker defines the requirements of the PDF/A-2 standard and contains a number of methods that override the implementations of its superclass
PdfA1Checker
.
The specification implemented by this class is ISO 19005-2
-
Field Summary
Modifier and TypeFieldDescriptionFields inherited from class com.itextpdf.pdfa.checker.PdfA1Checker
allowedNamedActions, allowedRenderingIntents, contentAnnotations
Fields inherited from class com.itextpdf.pdfa.checker.PdfAChecker
checkedObjects, checkedObjectsColorspace, cmykIsUsed, conformanceLevel, grayIsUsed, gsStackDepth, ICC_COLOR_SPACE_CMYK, ICC_COLOR_SPACE_GRAY, ICC_COLOR_SPACE_RGB, ICC_DEVICE_CLASS_MONITOR_PROFILE, ICC_DEVICE_CLASS_OUTPUT_PROFILE, maxGsStackDepth, pdfAOutputIntentColorSpace, rgbIsUsed
-
Constructor Summary
ConstructorDescriptionPdfA2Checker
(PdfAConformanceLevel conformanceLevel) Creates a PdfA2Checker with the required conformance level -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkAnnotation
(PdfDictionary annotDic) Verify the conformity of the annotation dictionary.protected void
checkAppearanceStream
(PdfStream appearanceStream) Check single annotation appearance stream.protected void
checkCatalogValidEntries
(PdfDictionary catalogDict) Checks if entries in catalog dictionary are valid.void
checkColor
(Color color, PdfDictionary currentColorSpaces, Boolean fill, PdfStream contentStream) This method checks compliance with the color restrictions imposed by the available color spaces in the document.void
checkColorSpace
(PdfColorSpace colorSpace, PdfDictionary currentColorSpaces, boolean checkAlternate, Boolean fill) This method performs a range of checks on the given color space, depending on the type and properties of that color space.protected void
Verify the conformity of used color spaces.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.protected void
checkFileSpec
(PdfDictionary fileSpec) Verify the conformity of the file specification dictionary.void
checkFontGlyphs
(PdfFont font, PdfStream contentStream) Performs a check of the each font glyph as a Form XObject.protected void
checkForm
(PdfDictionary form) Verify the conformity of the form dictionary.protected void
checkFormXObject
(PdfStream form) Verify the conformity of the form XObject dictionary.protected void
checkFormXObject
(PdfStream form, PdfStream contentStream) Verify the conformity of the Form XObject with appropriate specification.protected void
checkImage
(PdfStream image, PdfDictionary currentColorSpaces) Verify the conformity of the given image.void
checkInlineImage
(PdfStream inlineImage, PdfDictionary currentColorSpaces) This method checks compliance with the inline image restrictions in the PDF/A specs, specifically filter parameters.protected void
checkNonSymbolicTrueTypeFont
(PdfTrueTypeFont trueTypeFont) Verify the conformity of the non-symbolic TrueType font.protected void
checkOutputIntents
(PdfDictionary catalog) Verify the conformity of the output intents array in the catalog dictionary.protected void
checkPageObject
(PdfDictionary pageDict, PdfDictionary pageResources) Verify the conformity of the page dictionary.protected void
checkPageSize
(PdfDictionary page) Checks the allowable size of the page.protected void
checkPageTransparency
(PdfDictionary pageDict, PdfDictionary pageResources) Verify the conformity of the page transparency.protected void
checkPdfArray
(PdfArray array) Verify the conformity of the PDF array.protected void
checkPdfDictionary
(PdfDictionary dictionary) Verify the conformity of the PDF dictionary.protected void
checkPdfStream
(PdfStream stream) Verify the conformity of the PDF stream.void
checkSignature
(PdfDictionary signatureDict) This method checks compliance of the signature dictionaryRetrieve allowed actions in conforming document.Retrieve forbidden actions in conforming document.protected double
Retrieve maximum allowed real value.protected int
Returns maximum allowed bytes length of the string in a PDF document.Methods inherited from class com.itextpdf.pdfa.checker.PdfA1Checker
checkAction, checkCanvasStack, checkContentStream, checkContentStreamObject, checkFont, checkLogicalStructure, checkMetaData, checkPdfName, checkPdfNumber, checkPdfString, checkRenderingIntent, checkSymbolicTrueTypeFont, checkTrailer, checkXrefTable, getFormFields, getMaxIntegerValue, getMaxNameLength, getMaxNumberOfIndirectObjects, getMinIntegerValue
Methods inherited from class com.itextpdf.pdfa.checker.PdfAChecker
checkDocument, checkFlag, checkPdfObject, checkResources, checkResourcesOfAppearanceStreams, checkSinglePage, checkStructure, checkTagStructureElement, getConformanceLevel, isAlreadyChecked, isContainsTransparencyGroup, isFullCheckMode, objectIsChecked, setFullCheckMode
-
Field Details
-
forbiddenAnnotations
-
forbiddenActions
-
allowedBlendModes
-
-
Constructor Details
-
PdfA2Checker
Creates a PdfA2Checker with the required conformance level- Parameters:
-
conformanceLevel
- the required conformance level,a
oru
orb
-
-
Method Details
-
checkInlineImage
Description copied from class:PdfAChecker
This method checks compliance with the inline image restrictions in the PDF/A specs, specifically filter parameters.- Overrides:
-
checkInlineImage
in classPdfA1Checker
- Parameters:
-
inlineImage
- aPdfStream
containing the inline image -
currentColorSpaces
- aPdfDictionary
containing the color spaces used in the document
-
checkColor
public void checkColor(Color color, PdfDictionary currentColorSpaces, Boolean fill, PdfStream contentStream) Description copied from class:PdfAChecker
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- Overrides:
-
checkColor
in classPdfA1Checker
- Parameters:
-
color
- the color to check -
currentColorSpaces
- aPdfDictionary
containing the color spaces used in the document -
fill
- whether the color is used for fill or stroke operations -
contentStream
- current content stream
-
checkColorSpace
public void checkColorSpace(PdfColorSpace colorSpace, PdfDictionary currentColorSpaces, boolean checkAlternate, Boolean fill) Description copied from class:PdfAChecker
This method performs a range of checks on the given color space, depending on the type and properties of that color space.- Overrides:
-
checkColorSpace
in classPdfA1Checker
- Parameters:
-
colorSpace
- the color space to check -
currentColorSpaces
- aPdfDictionary
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
-
checkExtGState
Description copied from class:PdfAChecker
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- Overrides:
-
checkExtGState
in classPdfA1Checker
- Parameters:
-
extGState
- the graphics state to be checked -
contentStream
- current content stream
-
checkSignature
Description copied from class:PdfAChecker
This method checks compliance of the signature dictionary- Overrides:
-
checkSignature
in classPdfAChecker
- Parameters:
-
signatureDict
- aPdfDictionary
containing the signature.
-
checkNonSymbolicTrueTypeFont
Description copied from class:PdfAChecker
Verify the conformity of the non-symbolic TrueType font.- Overrides:
-
checkNonSymbolicTrueTypeFont
in classPdfA1Checker
- Parameters:
-
trueTypeFont
- thePdfTrueTypeFont
to check
-
getMaxRealValue
protected double getMaxRealValue()Description copied from class:PdfA1Checker
Retrieve maximum allowed real value.- Overrides:
-
getMaxRealValue
in classPdfA1Checker
- Returns:
- maximum allowed real number
-
getMaxStringLength
protected int getMaxStringLength()Description copied from class:PdfA1Checker
Returns maximum allowed bytes length of the string in a PDF document.- Overrides:
-
getMaxStringLength
in classPdfA1Checker
- Returns:
- maximum string length
-
checkPdfArray
Description copied from class:PdfAChecker
Verify the conformity of the PDF array.- Overrides:
-
checkPdfArray
in classPdfA1Checker
- Parameters:
-
array
- thePdfArray
to check
-
checkPdfDictionary
Description copied from class:PdfAChecker
Verify the conformity of the PDF dictionary.- Overrides:
-
checkPdfDictionary
in classPdfA1Checker
- Parameters:
-
dictionary
- thePdfDictionary
to check
-
checkAnnotation
Description copied from class:PdfAChecker
Verify the conformity of the annotation dictionary.- Overrides:
-
checkAnnotation
in classPdfA1Checker
- Parameters:
-
annotDic
- the annotationPdfDictionary
to be checked
-
checkAppearanceStream
Description copied from class:PdfAChecker
Check single annotation appearance stream.- Overrides:
-
checkAppearanceStream
in classPdfAChecker
- Parameters:
-
appearanceStream
- thePdfStream
to check
-
checkForm
Description copied from class:PdfAChecker
Verify the conformity of the form dictionary.- Overrides:
-
checkForm
in classPdfA1Checker
- Parameters:
-
form
- the formPdfDictionary
to be checked
-
checkCatalogValidEntries
Description copied from class:PdfAChecker
Checks if entries in catalog dictionary are valid.- Overrides:
-
checkCatalogValidEntries
in classPdfA1Checker
- Parameters:
-
catalogDict
- the catalogPdfDictionary
to be checked
-
checkPageSize
Description copied from class:PdfAChecker
Checks the allowable size of the page.- Overrides:
-
checkPageSize
in classPdfA1Checker
- Parameters:
-
page
- thePdfDictionary
of page which size being checked
-
checkFileSpec
Description copied from class:PdfAChecker
Verify the conformity of the file specification dictionary.- Overrides:
-
checkFileSpec
in classPdfA1Checker
- Parameters:
-
fileSpec
- thePdfDictionary
containing file specification to be checked
-
checkPdfStream
Description copied from class:PdfAChecker
Verify the conformity of the PDF stream.- Overrides:
-
checkPdfStream
in classPdfA1Checker
- Parameters:
-
stream
- thePdfStream
to check
-
checkPageObject
Description copied from class:PdfAChecker
Verify the conformity of the page dictionary.- Overrides:
-
checkPageObject
in classPdfA1Checker
- Parameters:
-
pageDict
- thePdfDictionary
to check -
pageResources
- the page's resources dictionary
-
checkPageTransparency
Description copied from class:PdfAChecker
Verify the conformity of the page transparency.- Overrides:
-
checkPageTransparency
in classPdfA1Checker
- Parameters:
-
pageDict
- thePdfDictionary
contains contents for transparency to be checked -
pageResources
- thePdfDictionary
contains resources for transparency to be checked
-
checkOutputIntents
Description copied from class:PdfAChecker
Verify the conformity of the output intents array in the catalog dictionary.- Overrides:
-
checkOutputIntents
in classPdfA1Checker
- Parameters:
-
catalog
- thePdfDictionary
to check
-
getForbiddenActions
Description copied from class:PdfAChecker
Retrieve forbidden actions in conforming document.- Overrides:
-
getForbiddenActions
in classPdfA1Checker
- Returns:
-
set of
PdfName
with forbidden actions
-
getAllowedNamedActions
Description copied from class:PdfAChecker
Retrieve allowed actions in conforming document.- Overrides:
-
getAllowedNamedActions
in classPdfA1Checker
- Returns:
-
set of
PdfName
with allowed named actions
-
checkColorsUsages
protected void checkColorsUsages()Description copied from class:PdfAChecker
Verify the conformity of used color spaces.- Overrides:
-
checkColorsUsages
in classPdfA1Checker
-
checkImage
Description copied from class:PdfAChecker
Verify the conformity of the given image.- Overrides:
-
checkImage
in classPdfA1Checker
- Parameters:
-
image
- the image to check -
currentColorSpaces
- thePdfDictionary
containing the color spaces used in the document
-
checkFontGlyphs
Description copied from class:PdfAChecker
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- Overrides:
-
checkFontGlyphs
in classPdfA1Checker
- Parameters:
-
font
-PdfFont
to be checked -
contentStream
- stream containing checked font
-
checkFormXObject
Description copied from class:PdfAChecker
Verify the conformity of the form XObject dictionary.- Overrides:
-
checkFormXObject
in classPdfA1Checker
- Parameters:
-
form
- thePdfStream
to check
-
checkFormXObject
Verify the conformity of the Form XObject with appropriate specification. Throws PdfAConformanceException if any discrepancy was found
-