Package com.itextpdf.pdfa.checker
Class PdfAChecker
- java.lang.Object
-
- com.itextpdf.pdfa.checker.PdfAChecker
-
- All Implemented Interfaces:
IValidationChecker
- Direct Known Subclasses:
PdfA1Checker
public abstract class PdfAChecker extends java.lang.Object implements IValidationChecker
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 - pdfa project.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanalreadyLoggedThatObjectFlushingWasNotPerformedprivate booleanalreadyLoggedThatPageFlushingWasNotPerformedprotected java.util.Set<PdfObject>checkedObjectsContains some objects that are already checked.protected java.util.Map<PdfObject,PdfColorSpace>checkedObjectsColorspaceprotected java.util.Set<PdfObject>cmykUsedObjectsprotected PdfAConformanceconformance(package private) static java.util.function.Function<java.lang.String,PdfException>EXCEPTION_SUPPLIERprivate booleanfullCheckModeprotected java.util.Set<PdfObject>grayUsedObjectsprotected intgsStackDepthstatic java.lang.StringICC_COLOR_SPACE_CMYKThe Cyan-Magenta-Yellow-Key (black) color profile as defined by the International Color Consortium.static java.lang.StringICC_COLOR_SPACE_GRAYThe Grayscale color profile as defined by the International Color Consortium.static java.lang.StringICC_COLOR_SPACE_RGBThe Red-Green-Blue color profile as defined by the International Color Consortium.static java.lang.StringICC_DEVICE_CLASS_MONITOR_PROFILEThe Monitor device classstatic java.lang.StringICC_DEVICE_CLASS_OUTPUT_PROFILEThe Output device classstatic intmaxGsStackDepthThe maximum Graphics State stack depth in PDF/A documents, i.e.protected java.lang.StringpdfAOutputIntentColorSpaceprotected PdfStreampdfAOutputIntentDestProfileprotected java.util.Set<PdfObject>rgbUsedObjects
-
Constructor Summary
Constructors Modifier Constructor Description protectedPdfAChecker(PdfAConformance aConformance)Creates a PdfAChecker with the required conformance.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract voidcheckAction(PdfDictionary action)Checks if the action is allowed.protected abstract voidcheckAnnotation(PdfDictionary annotDic)Verify the conformity of the annotation dictionary.private voidcheckAnnotations(PdfDictionary page)protected voidcheckAppearanceStream(PdfStream appearanceStream)Check single annotation appearance stream.private voidcheckArrayRecursively(PdfArray array)abstract voidcheckCanvasStack(char stackOperation)This method checks compliance with the graphics state architectural limitation, explained bymaxGsStackDepth.protected abstract voidcheckCatalog(PdfCatalog catalog)Verify the conformity of the pdf catalog.protected abstract voidcheckCatalogValidEntries(PdfDictionary catalogDict)Checks if entries in catalog dictionary are valid.abstract voidcheckColor(CanvasGraphicsState gState, Color color, PdfDictionary currentColorSpaces, java.lang.Boolean fill, PdfStream contentStream)This method checks compliance with the color restrictions imposed by the available color spaces in the document.abstract voidcheckColorSpace(PdfColorSpace colorSpace, PdfObject pdfObject, PdfDictionary currentColorSpaces, boolean checkAlternate, java.lang.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 abstract voidcheckContentStream(PdfStream contentStream)Attest content stream conformance with appropriate specification.protected voidcheckContentStreamObject(PdfObject object)Verify the conformity of the operand of content stream with appropriate specification.abstract voidcheckCrypto(PdfObject crypto)Verify the conformity of encryption usage.private voidcheckDictionaryRecursively(PdfDictionary dictionary)voidcheckDocument(PdfCatalog catalog)This method checks a number of document-wide requirements of the PDF/A standard.abstract voidcheckExtGState(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 abstract voidcheckFileSpec(PdfDictionary fileSpec)Verify the conformity of the file specification dictionary.protected static booleancheckFlag(int flags, int flag)Deprecated.in favour ofPdfCheckersUtil.checkFlag(int, int)abstract voidcheckFont(PdfFont pdfFont)Performs a number of checks on the font.abstract voidcheckFontGlyphs(PdfFont font, PdfStream contentStream)Performs a check of the each font glyph as a Form XObject.protected abstract voidcheckForm(PdfDictionary form)Verify the conformity of the form dictionary.protected abstract voidcheckFormXObject(PdfStream form)Verify the conformity of the form XObject dictionary.protected abstract voidcheckImage(PdfStream image, PdfDictionary currentColorSpaces)Verify the conformity of the given image.abstract voidcheckInlineImage(PdfStream inlineImage, PdfDictionary currentColorSpaces)This method checks compliance with the inline image restrictions in the PDF/A specs, specifically filter parameters.protected abstract voidcheckLogicalStructure(PdfDictionary catalog)Performs a number of checks on the logical structure of the document.protected abstract voidcheckMetaData(PdfDictionary catalog)Performs a number of checks on the metadata of the document.protected abstract voidcheckNonSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont)Verify the conformity of the non-symbolic TrueType font.private voidcheckOpenAction(PdfObject openAction)private voidcheckOutlines(PdfOutline outline)protected abstract voidcheckOutputIntents(PdfDictionary catalogOrPageDict)Verify the conformity of the output intents array in the catalog dictionary.private voidcheckPage(PdfPage page)protected abstract voidcheckPageColorsUsages(PdfDictionary pageDict, PdfDictionary pageResources)Verify the conformity of used color spaces on the page.protected abstract voidcheckPageObject(PdfDictionary page, PdfDictionary pageResources)Verify the conformity of the page dictionary.private voidcheckPages(PdfDocument document)protected abstract voidcheckPageSize(PdfDictionary page)Checks the allowable size of the page.protected abstract voidcheckPageTransparency(PdfDictionary pageDict, PdfDictionary pageResources)Verify the conformity of the page transparency.protected abstract voidcheckPdfArray(PdfArray array)Verify the conformity of the PDF array.protected abstract voidcheckPdfDictionary(PdfDictionary dictionary)Verify the conformity of the PDF dictionary.protected abstract voidcheckPdfName(PdfName name)Verify the conformity of the PDF name.protected abstract voidcheckPdfNumber(PdfNumber number)Verify the conformity of the PDF number.voidcheckPdfObject(PdfObject obj)This method checks the requirements that must be fulfilled by a COS object in a PDF/A document.protected abstract voidcheckPdfStream(PdfStream stream)Verify the conformity of the PDF stream.protected abstract voidcheckPdfString(PdfString string)Verify the conformity of the PDF string.abstract voidcheckRenderingIntent(PdfName intent)Checks whether the rendering intent of the document is within the allowed range of intents.protected voidcheckResources(PdfDictionary resources, PdfObject pdfObject)Verify the conformity of the resources dictionary.protected voidcheckResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict)Checks resources of the appearance streams.private voidcheckResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict, java.util.Set<PdfObject> checkedObjects)voidcheckSignature(PdfDictionary signatureDict)This method checks compliance of the signature dictionaryabstract voidcheckSignatureType(boolean isCAdES)This method checks compliance of the signature type.voidcheckSinglePage(PdfPage page)This method checks all requirements that must be fulfilled by a page in a PDF/A document.protected static booleancheckStructure(PdfAConformance aConformance)Checks conformance of PDF/A standard.protected abstract voidcheckSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont)Verify the conformity of the symbolic TrueType font.voidcheckTagStructureElement(PdfObject obj)This method checks compliance of the tag structure elements, such as struct elements or parent tree entries.abstract voidcheckText(java.lang.String text, PdfFont font)Verify the conformity of the text written by the specified font.protected abstract voidcheckTrailer(PdfDictionary trailer)Verify the conformity of the trailer dictionary.abstract voidcheckXrefTable(PdfXrefTable xrefTable)Verify the conformity of the cross-reference table.PdfAConformancegetAConformance()Gets thePdfAConformancefor this file.protected abstract java.util.Set<PdfName>getAllowedNamedActions()Retrieve allowed actions in conforming document.protected abstract java.util.Set<PdfName>getForbiddenActions()Retrieve forbidden actions in conforming document.protected abstract longgetMaxNumberOfIndirectObjects()Retrieve maximum allowed number of indirect objects in conforming document.(package private) PdfDictionarygetPdfAOutputIntent(PdfArray outputIntents)protected booleanisAlreadyChecked(PdfDictionary dictionary)Checks whether the specified dictionary was already checked.protected static booleanisContainsTransparencyGroup(PdfDictionary dictionary)Checks whether the specified dictionary has a transparency group.booleanisFullCheckMode()In full check mode all objects will be tested for ISO conformance.booleanisPdfObjectReadyToFlush(PdfObject object)IsPdfObjectready to flush.private voidsetCheckerOutputIntent(PdfDictionary outputIntent)voidsetFullCheckMode(boolean fullCheckMode)In full check mode all objects will be tested for ISO conformance.voidsetPdfAOutputIntentColorSpace(PdfDictionary catalog)Set Pdf A output intent color space.voidvalidate(IValidationContext context)Validate the providedIValidationContext.
-
-
-
Field Detail
-
ICC_COLOR_SPACE_RGB
public static final java.lang.String ICC_COLOR_SPACE_RGB
The Red-Green-Blue color profile as defined by the International Color Consortium.- See Also:
- Constant Field Values
-
ICC_COLOR_SPACE_CMYK
public static final java.lang.String ICC_COLOR_SPACE_CMYK
The Cyan-Magenta-Yellow-Key (black) color profile as defined by the International Color Consortium.- See Also:
- Constant Field Values
-
ICC_COLOR_SPACE_GRAY
public static final java.lang.String ICC_COLOR_SPACE_GRAY
The Grayscale color profile as defined by the International Color Consortium.- See Also:
- Constant Field Values
-
ICC_DEVICE_CLASS_OUTPUT_PROFILE
public static final java.lang.String ICC_DEVICE_CLASS_OUTPUT_PROFILE
The Output device class- See Also:
- Constant Field Values
-
ICC_DEVICE_CLASS_MONITOR_PROFILE
public static final java.lang.String ICC_DEVICE_CLASS_MONITOR_PROFILE
The Monitor device class- See Also:
- Constant Field Values
-
maxGsStackDepth
public static final int maxGsStackDepth
The maximum Graphics State stack depth in PDF/A documents, i.e. the maximum number of graphics state operators with codeqthat may be opened (i.e. not yet closed by a correspondingQ) 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".- See Also:
- Constant Field Values
-
conformance
protected PdfAConformance conformance
-
pdfAOutputIntentDestProfile
protected PdfStream pdfAOutputIntentDestProfile
-
pdfAOutputIntentColorSpace
protected java.lang.String pdfAOutputIntentColorSpace
-
gsStackDepth
protected int gsStackDepth
-
rgbUsedObjects
protected java.util.Set<PdfObject> rgbUsedObjects
-
cmykUsedObjects
protected java.util.Set<PdfObject> cmykUsedObjects
-
grayUsedObjects
protected java.util.Set<PdfObject> grayUsedObjects
-
checkedObjects
protected java.util.Set<PdfObject> checkedObjects
Contains some objects that are already checked. NOTE: Not all objects that were checked are stored in that set. This set is used for avoiding double checks for actions, signatures, xObjects and page objects; and for letting those objects to be manually flushed. Use this mechanism carefully: objects that are able to be changed (or at least if object's properties that shall be checked are able to be changed) shouldn't be marked as checked if they are not to be flushed immediately.
-
checkedObjectsColorspace
protected java.util.Map<PdfObject,PdfColorSpace> checkedObjectsColorspace
-
EXCEPTION_SUPPLIER
static final java.util.function.Function<java.lang.String,PdfException> EXCEPTION_SUPPLIER
-
fullCheckMode
private boolean fullCheckMode
-
alreadyLoggedThatPageFlushingWasNotPerformed
private boolean alreadyLoggedThatPageFlushingWasNotPerformed
-
alreadyLoggedThatObjectFlushingWasNotPerformed
private boolean alreadyLoggedThatObjectFlushingWasNotPerformed
-
-
Constructor Detail
-
PdfAChecker
protected PdfAChecker(PdfAConformance aConformance)
Creates a PdfAChecker with the required conformance.- Parameters:
aConformance- the required conformance
-
-
Method Detail
-
checkDocument
public void checkDocument(PdfCatalog catalog)
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
-
validate
public void validate(IValidationContext context)
Validate the providedIValidationContext..- Specified by:
validatein interfaceIValidationChecker- Parameters:
context- theIValidationContextto validate
-
isPdfObjectReadyToFlush
public boolean isPdfObjectReadyToFlush(PdfObject object)
IsPdfObjectready to flush..- Specified by:
isPdfObjectReadyToFlushin interfaceIValidationChecker- Parameters:
object- the pdf object to check- Returns:
trueif the object is ready to flush,falseotherwise
-
checkSinglePage
public void checkSinglePage(PdfPage page)
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
-
checkPdfObject
public void checkPdfObject(PdfObject obj)
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
-
getAConformance
public PdfAConformance getAConformance()
Gets thePdfAConformancefor this file.- Returns:
- the defined conformance for this document.
-
isFullCheckMode
public boolean isFullCheckMode()
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:
PdfObject.isModified()
-
setFullCheckMode
public void setFullCheckMode(boolean fullCheckMode)
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:
PdfObject.isModified()
-
checkTagStructureElement
public void checkTagStructureElement(PdfObject obj)
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.
-
checkSignature
public void checkSignature(PdfDictionary signatureDict)
This method checks compliance of the signature dictionary- Parameters:
signatureDict- aPdfDictionarycontaining the signature.
-
checkSignatureType
public abstract void checkSignatureType(boolean isCAdES)
This method checks compliance of the signature type.- Parameters:
isCAdES-trueif CAdES signature type is used,falseotherwise
-
checkCanvasStack
public abstract void checkCanvasStack(char stackOperation)
This method checks compliance with the graphics state architectural limitation, explained bymaxGsStackDepth.- Parameters:
stackOperation- the operation to check the graphics state counter for
-
checkInlineImage
public abstract void checkInlineImage(PdfStream inlineImage, PdfDictionary currentColorSpaces)
This method checks compliance with the inline image restrictions in the PDF/A specs, specifically filter parameters.- Parameters:
inlineImage- aPdfStreamcontaining the inline imagecurrentColorSpaces- aPdfDictionarycontaining the color spaces used in the document
-
checkColor
public abstract void checkColor(CanvasGraphicsState gState, Color color, PdfDictionary currentColorSpaces, java.lang.Boolean fill, PdfStream contentStream)
This method checks compliance with the color restrictions imposed by the available color spaces in the document.- Parameters:
gState- canvas graphics statecolor- the color to checkcurrentColorSpaces- aPdfDictionarycontaining the color spaces used in the documentfill- whether the color is used for fill or stroke operationscontentStream- current content stream
-
checkColorSpace
public abstract void checkColorSpace(PdfColorSpace colorSpace, PdfObject pdfObject, PdfDictionary currentColorSpaces, boolean checkAlternate, java.lang.Boolean fill)
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 checkpdfObject- the pdf object to check color space incurrentColorSpaces- aPdfDictionarycontaining the color spaces used in the documentcheckAlternate- whether or not to also check the parent color spacefill- whether the color space is used for fill or stroke operations
-
setPdfAOutputIntentColorSpace
public void setPdfAOutputIntentColorSpace(PdfDictionary catalog)
Set Pdf A output intent color space.- Parameters:
catalog- Catalog dictionary to retrieve the color space from.
-
checkRenderingIntent
public abstract void checkRenderingIntent(PdfName intent)
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
-
checkFontGlyphs
public abstract void checkFontGlyphs(PdfFont font, PdfStream contentStream)
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-PdfFontto be checkedcontentStream- stream containing checked font
-
checkExtGState
public 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. This method will be abstract in the update 7.2- Parameters:
extGState- the graphics state to be checkedcontentStream- current content stream
-
checkFont
public abstract void checkFont(PdfFont pdfFont)
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
-
checkXrefTable
public abstract void checkXrefTable(PdfXrefTable xrefTable)
Verify the conformity of the cross-reference table.- Parameters:
xrefTable- is the Xref table
-
checkCrypto
public abstract void checkCrypto(PdfObject crypto)
Verify the conformity of encryption usage.- Parameters:
crypto- encryption object to verify
-
checkText
public abstract void checkText(java.lang.String text, PdfFont font)Verify the conformity of the text written by the specified font.- Parameters:
text- text to verifyfont- font to verify the text against
-
checkContentStream
protected abstract void checkContentStream(PdfStream contentStream)
Attest content stream conformance with appropriate specification. Throws PdfAConformanceException if any discrepancy was found- Parameters:
contentStream- is a content stream to validate
-
checkContentStreamObject
protected void checkContentStreamObject(PdfObject object)
Verify the conformity of the operand of content stream with appropriate specification. Throws PdfAConformanceException if any discrepancy was found- Parameters:
object- is an operand of content stream to validate
-
getMaxNumberOfIndirectObjects
protected abstract long getMaxNumberOfIndirectObjects()
Retrieve maximum allowed number of indirect objects in conforming document.- Returns:
- maximum allowed number of indirect objects
-
getForbiddenActions
protected abstract java.util.Set<PdfName> getForbiddenActions()
Retrieve forbidden actions in conforming document.- Returns:
- set of
PdfNamewith forbidden actions
-
getAllowedNamedActions
protected abstract java.util.Set<PdfName> getAllowedNamedActions()
Retrieve allowed actions in conforming document.- Returns:
- set of
PdfNamewith allowed named actions
-
checkAction
protected abstract void checkAction(PdfDictionary action)
Checks if the action is allowed.- Parameters:
action- to be checked
-
checkAnnotation
protected abstract void checkAnnotation(PdfDictionary annotDic)
Verify the conformity of the annotation dictionary.- Parameters:
annotDic- the annotationPdfDictionaryto be checked
-
checkCatalogValidEntries
protected abstract void checkCatalogValidEntries(PdfDictionary catalogDict)
Checks if entries in catalog dictionary are valid.- Parameters:
catalogDict- the catalogPdfDictionaryto be checked
-
checkPageColorsUsages
protected abstract void checkPageColorsUsages(PdfDictionary pageDict, PdfDictionary pageResources)
Verify the conformity of used color spaces on the page.- Parameters:
pageDict- thePdfDictionarycontains contents for colors to be checkedpageResources- thePdfDictionarycontains resources for colors to be checked
-
checkImage
protected abstract void checkImage(PdfStream image, PdfDictionary currentColorSpaces)
Verify the conformity of the given image.- Parameters:
image- the image to checkcurrentColorSpaces- thePdfDictionarycontaining the color spaces used in the document
-
checkFileSpec
protected abstract void checkFileSpec(PdfDictionary fileSpec)
Verify the conformity of the file specification dictionary.- Parameters:
fileSpec- thePdfDictionarycontaining file specification to be checked
-
checkForm
protected abstract void checkForm(PdfDictionary form)
Verify the conformity of the form dictionary.- Parameters:
form- the formPdfDictionaryto be checked
-
checkFormXObject
protected abstract void checkFormXObject(PdfStream form)
Verify the conformity of the form XObject dictionary.- Parameters:
form- thePdfStreamto check
-
checkLogicalStructure
protected abstract void checkLogicalStructure(PdfDictionary catalog)
Performs a number of checks on the logical structure of the document.- Parameters:
catalog- the catalogPdfDictionaryto check
-
checkMetaData
protected abstract void checkMetaData(PdfDictionary catalog)
Performs a number of checks on the metadata of the document.- Parameters:
catalog- the catalogPdfDictionaryto check
-
checkNonSymbolicTrueTypeFont
protected abstract void checkNonSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont)
Verify the conformity of the non-symbolic TrueType font.- Parameters:
trueTypeFont- thePdfTrueTypeFontto check
-
checkOutputIntents
protected abstract void checkOutputIntents(PdfDictionary catalogOrPageDict)
Verify the conformity of the output intents array in the catalog dictionary.- Parameters:
catalogOrPageDict- thePdfDictionaryof a catalog or page to check
-
checkPageObject
protected abstract void checkPageObject(PdfDictionary page, PdfDictionary pageResources)
Verify the conformity of the page dictionary.- Parameters:
page- thePdfDictionaryto checkpageResources- the page's resources dictionary
-
checkPageSize
protected abstract void checkPageSize(PdfDictionary page)
Checks the allowable size of the page.- Parameters:
page- thePdfDictionaryof page which size being checked
-
checkPdfArray
protected abstract void checkPdfArray(PdfArray array)
Verify the conformity of the PDF array.- Parameters:
array- thePdfArrayto check
-
checkPdfDictionary
protected abstract void checkPdfDictionary(PdfDictionary dictionary)
Verify the conformity of the PDF dictionary.- Parameters:
dictionary- thePdfDictionaryto check
-
checkPdfName
protected abstract void checkPdfName(PdfName name)
Verify the conformity of the PDF name.- Parameters:
name- thePdfNameto check
-
checkPdfNumber
protected abstract void checkPdfNumber(PdfNumber number)
Verify the conformity of the PDF number.- Parameters:
number- thePdfNumberto check
-
checkPdfStream
protected abstract void checkPdfStream(PdfStream stream)
Verify the conformity of the PDF stream.- Parameters:
stream- thePdfStreamto check
-
checkPdfString
protected abstract void checkPdfString(PdfString string)
Verify the conformity of the PDF string.- Parameters:
string- thePdfStringto check
-
checkSymbolicTrueTypeFont
protected abstract void checkSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont)
Verify the conformity of the symbolic TrueType font.- Parameters:
trueTypeFont- thePdfTrueTypeFontto check
-
checkTrailer
protected abstract void checkTrailer(PdfDictionary trailer)
Verify the conformity of the trailer dictionary.- Parameters:
trailer- thePdfDictionaryof trailer to check
-
checkCatalog
protected abstract void checkCatalog(PdfCatalog catalog)
Verify the conformity of the pdf catalog.- Parameters:
catalog- thePdfCatalogof trailer to check
-
checkPageTransparency
protected abstract void checkPageTransparency(PdfDictionary pageDict, PdfDictionary pageResources)
Verify the conformity of the page transparency.- Parameters:
pageDict- thePdfDictionarycontains contents for transparency to be checkedpageResources- thePdfDictionarycontains resources for transparency to be checked
-
checkResources
protected void checkResources(PdfDictionary resources, PdfObject pdfObject)
Verify the conformity of the resources dictionary.- Parameters:
resources- thePdfDictionaryto be checkedpdfObject- the pdf object to check resources for
-
checkFlag
@Deprecated protected static boolean checkFlag(int flags, int flag)Deprecated.in favour ofPdfCheckersUtil.checkFlag(int, int)Checks if the specified flag is set.- Parameters:
flags- a set of flags specifying various characteristics of the PDF objectflag- to be checked- Returns:
- true if the specified flag is set
-
checkStructure
protected static boolean checkStructure(PdfAConformance aConformance)
Checks conformance of PDF/A standard.- Parameters:
aConformance- thePdfAConformanceto be checked- Returns:
- true if the specified aConformance is
afor PDF/A-1, PDF/A-2 or PDF/A-3
-
isContainsTransparencyGroup
protected static boolean isContainsTransparencyGroup(PdfDictionary dictionary)
Checks whether the specified dictionary has a transparency group.- Parameters:
dictionary- thePdfDictionaryto check- Returns:
- true if and only if the specified dictionary has a
PdfName.Groupkey and its value is a dictionary withPdfName.Transparencysubtype
-
isAlreadyChecked
protected boolean isAlreadyChecked(PdfDictionary dictionary)
Checks whether the specified dictionary was already checked.- Parameters:
dictionary- thePdfDictionaryto check- Returns:
- true if the specified dictionary was checked
-
checkResourcesOfAppearanceStreams
protected void checkResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict)
Checks resources of the appearance streams.- Parameters:
appearanceStreamsDict- the dictionary with appearance streams to check.
-
checkAppearanceStream
protected void checkAppearanceStream(PdfStream appearanceStream)
Check single annotation appearance stream.- Parameters:
appearanceStream- thePdfStreamto check
-
getPdfAOutputIntent
PdfDictionary getPdfAOutputIntent(PdfArray outputIntents)
-
checkResourcesOfAppearanceStreams
private void checkResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict, java.util.Set<PdfObject> checkedObjects)
-
checkArrayRecursively
private void checkArrayRecursively(PdfArray array)
-
checkDictionaryRecursively
private void checkDictionaryRecursively(PdfDictionary dictionary)
-
checkPages
private void checkPages(PdfDocument document)
-
checkPage
private void checkPage(PdfPage page)
-
checkOpenAction
private void checkOpenAction(PdfObject openAction)
-
checkAnnotations
private void checkAnnotations(PdfDictionary page)
-
checkOutlines
private void checkOutlines(PdfOutline outline)
-
setCheckerOutputIntent
private void setCheckerOutputIntent(PdfDictionary outputIntent)
-
-