public abstract class PdfAChecker extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Set<PdfObject> |
checkedObjects
Contains some objects that are already checked.
|
protected Map<PdfObject,PdfColorSpace> |
checkedObjectsColorspace |
protected boolean |
cmykIsUsed |
protected PdfAConformanceLevel |
conformanceLevel |
protected boolean |
grayIsUsed |
protected int |
gsStackDepth |
static String |
ICC_COLOR_SPACE_CMYK
The Cyan-Magenta-Yellow-Key (black) color profile as defined by the International Color Consortium.
|
static String |
ICC_COLOR_SPACE_GRAY
The Grayscale color profile as defined by the International Color Consortium.
|
static String |
ICC_COLOR_SPACE_RGB
The Red-Green-Blue color profile as defined by the International Color Consortium.
|
static String |
ICC_DEVICE_CLASS_MONITOR_PROFILE
The Monitor device class
|
static String |
ICC_DEVICE_CLASS_OUTPUT_PROFILE
The Output device class
|
static int |
maxGsStackDepth
The maximum Graphics State stack depth in PDF/A documents, i.e.
|
protected String |
pdfAOutputIntentColorSpace |
protected boolean |
rgbIsUsed |
Modifier | Constructor and Description |
---|---|
protected |
PdfAChecker(PdfAConformanceLevel conformanceLevel) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
checkAction(PdfDictionary action) |
protected abstract void |
checkAnnotation(PdfDictionary annotDic) |
protected void |
checkAppearanceStream(PdfStream appearanceStream)
Check single annotation appearance stream.
|
abstract void |
checkCanvasStack(char stackOperation)
This method checks compliance with the graphics state architectural limitation, explained by maxGsStackDepth .
|
protected abstract void |
checkCatalogValidEntries(PdfDictionary catalogDict) |
abstract void |
checkColor(Color color, PdfDictionary currentColorSpaces, Boolean fill)
Deprecated.
This method will be replaced by
checkColor in 7.2 release
|
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.
|
abstract 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 abstract void |
checkColorsUsages() |
protected void |
checkContentStream(PdfStream contentStream)
Attest content stream conformance with appropriate specification.
|
protected void |
checkContentStreamObject(PdfObject object)
Verify the conformity of the operand of content stream with appropriate specification.
|
void |
checkDocument(PdfCatalog catalog)
This method checks a number of document-wide requirements of the PDF/A standard.
|
abstract void |
checkExtGState(CanvasGraphicsState extGState)
Deprecated.
This method will be replaced by
checkExtGState in 7.2 release
|
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 abstract void |
checkFileSpec(PdfDictionary fileSpec) |
protected static boolean |
checkFlag(int flags, int flag) |
abstract void |
checkFont(PdfFont pdfFont)
Performs a number of checks on the font.
|
void |
checkFontGlyphs(PdfFont font, PdfStream contentStream)
Performs a check of the each font glyph as a Form XObject.
|
protected abstract void |
checkForm(PdfDictionary form) |
protected abstract void |
checkFormXObject(PdfStream form) |
protected abstract void |
checkImage(PdfStream image, PdfDictionary currentColorSpaces) |
abstract void |
checkInlineImage(PdfStream inlineImage, PdfDictionary currentColorSpaces)
This method checks compliance with the inline image restrictions in the PDF/A specs, specifically filter parameters.
|
protected abstract void |
checkLogicalStructure(PdfDictionary catalog) |
protected abstract void |
checkMetaData(PdfDictionary catalog) |
protected abstract void |
checkNonSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont) |
protected abstract void |
checkOutputIntents(PdfDictionary catalog) |
protected abstract void |
checkPageObject(PdfDictionary page, PdfDictionary pageResources) |
protected abstract void |
checkPageSize(PdfDictionary page) |
protected void |
checkPageTransparency(PdfDictionary pageDict, PdfDictionary pageResources) |
protected abstract void |
checkPdfArray(PdfArray array) |
protected abstract void |
checkPdfDictionary(PdfDictionary dictionary) |
protected abstract void |
checkPdfName(PdfName name) |
protected abstract void |
checkPdfNumber(PdfNumber number) |
void |
checkPdfObject(PdfObject obj)
This method checks the requirements that must be fulfilled by a COS object in a PDF/A document.
|
protected abstract void |
checkPdfStream(PdfStream stream) |
protected abstract void |
checkPdfString(PdfString string) |
abstract void |
checkRenderingIntent(PdfName intent)
Checks whether the rendering intent of the document is within the allowed range of intents.
|
protected void |
checkResources(PdfDictionary resources) |
protected void |
checkResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict)
Checks resources of the appearance streams.
|
void |
checkSinglePage(PdfPage page)
This method checks all requirements that must be fulfilled by a page in a PDF/A document.
|
protected static boolean |
checkStructure(PdfAConformanceLevel conformanceLevel) |
protected abstract void |
checkSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont) |
void |
checkTagStructureElement(PdfObject obj)
This method checks compliance of the tag structure elements, such as struct elements or parent tree entries.
|
protected abstract void |
checkTrailer(PdfDictionary trailer) |
abstract void |
checkXrefTable(PdfXrefTable xrefTable)
Verify the conformity of the cross-reference table.
|
protected abstract Set<PdfName> |
getAllowedNamedActions() |
PdfAConformanceLevel |
getConformanceLevel()
Gets the PdfAConformanceLevel for this file.
|
protected abstract Set<PdfName> |
getForbiddenActions() |
protected abstract long |
getMaxNumberOfIndirectObjects()
Retrieve maximum allowed number of indirect objects in conforming document.
|
protected boolean |
isAlreadyChecked(PdfDictionary dictionary) |
protected static boolean |
isContainsTransparencyGroup(PdfDictionary dictionary)
Checks whether the specified dictionary has a transparency group.
|
boolean |
isFullCheckMode()
In full check mode all objects will be tested for ISO conformance.
|
boolean |
objectIsChecked(PdfObject object)
Remembers which objects have already been checked, in order to avoid redundant checks.
|
void |
setFullCheckMode(boolean fullCheckMode)
In full check mode all objects will be tested for ISO conformance.
|
public static final String ICC_COLOR_SPACE_RGB
public static final String ICC_COLOR_SPACE_CMYK
public static final String ICC_COLOR_SPACE_GRAY
public static final String ICC_DEVICE_CLASS_OUTPUT_PROFILE
public static final String ICC_DEVICE_CLASS_MONITOR_PROFILE
public static final int maxGsStackDepth
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".
protected PdfAConformanceLevel conformanceLevel
protected String pdfAOutputIntentColorSpace
protected int gsStackDepth
protected boolean rgbIsUsed
protected boolean cmykIsUsed
protected boolean grayIsUsed
protected Set<PdfObject> checkedObjects
protected Map<PdfObject,PdfColorSpace> checkedObjectsColorspace
protected PdfAChecker(PdfAConformanceLevel conformanceLevel)
public void checkDocument(PdfCatalog catalog)
catalog
- The catalog being checked
public void checkSinglePage(PdfPage page)
page
- the page that must be checked
public void checkPdfObject(PdfObject obj)
obj
- the COS object that must be checked
public PdfAConformanceLevel getConformanceLevel()
PdfAConformanceLevel
for this file.
public boolean isFullCheckMode()
PdfObject.isModified()
public void setFullCheckMode(boolean fullCheckMode)
fullCheckMode
- is a new value for full check mode switcher
PdfObject.isModified()
public boolean objectIsChecked(PdfObject object)
object
- the object to check
public void checkTagStructureElement(PdfObject obj)
obj
- an object that represents tag structure element.
public abstract void checkCanvasStack(char stackOperation)
maxGsStackDepth
.
stackOperation
- the operation to check the graphics state counter for
public abstract void checkInlineImage(PdfStream inlineImage, PdfDictionary currentColorSpaces)
inlineImage
- a PdfStream
containing the inline image
currentColorSpaces
- a PdfDictionary
containing the color spaces used in the document
@Deprecated public abstract void checkColor(Color color, PdfDictionary currentColorSpaces, Boolean fill)
checkColor
in 7.2 release
color
- the color to check
currentColorSpaces
- a PdfDictionary
containing the color spaces used in the document
fill
- whether the color is used for fill or stroke operations
public void checkColor(Color color, PdfDictionary currentColorSpaces, Boolean fill, PdfStream contentStream)
color
- the color to check
currentColorSpaces
- a PdfDictionary
containing the color spaces used in the document
fill
- whether the color is used for fill or stroke operations
contentStream
- current content stream
public abstract void checkColorSpace(PdfColorSpace colorSpace, PdfDictionary currentColorSpaces, boolean checkAlternate, Boolean fill)
colorSpace
- the color space to check
currentColorSpaces
- a 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
public abstract void checkRenderingIntent(PdfName intent)
intent
- the intent to be analyzed
@Deprecated public abstract void checkExtGState(CanvasGraphicsState extGState)
checkExtGState
in 7.2 release
extGState
- the graphics state to be checked
public void checkExtGState(CanvasGraphicsState extGState, PdfStream contentStream)
extGState
- the graphics state to be checked
contentStream
- current content stream
public abstract void checkFont(PdfFont pdfFont)
pdfFont
- font to be checked
public void checkFontGlyphs(PdfFont font, PdfStream contentStream)
font
- PdfFont
to be checked
contentStream
- stream containing checked font
public abstract void checkXrefTable(PdfXrefTable xrefTable)
xrefTable
- is the Xref table
protected void checkPageTransparency(PdfDictionary pageDict, PdfDictionary pageResources)
protected void checkContentStream(PdfStream contentStream)
contentStream
- is a content stream to validate
protected void checkContentStreamObject(PdfObject object)
object
- is an operand of content stream to validate
protected abstract long getMaxNumberOfIndirectObjects()
protected abstract void checkAction(PdfDictionary action)
protected abstract void checkAnnotation(PdfDictionary annotDic)
protected abstract void checkCatalogValidEntries(PdfDictionary catalogDict)
protected abstract void checkColorsUsages()
protected abstract void checkImage(PdfStream image, PdfDictionary currentColorSpaces)
protected abstract void checkFileSpec(PdfDictionary fileSpec)
protected abstract void checkForm(PdfDictionary form)
protected abstract void checkFormXObject(PdfStream form)
protected abstract void checkLogicalStructure(PdfDictionary catalog)
protected abstract void checkMetaData(PdfDictionary catalog)
protected abstract void checkNonSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont)
protected abstract void checkOutputIntents(PdfDictionary catalog)
protected abstract void checkPageObject(PdfDictionary page, PdfDictionary pageResources)
protected abstract void checkPageSize(PdfDictionary page)
protected abstract void checkPdfArray(PdfArray array)
protected abstract void checkPdfDictionary(PdfDictionary dictionary)
protected abstract void checkPdfName(PdfName name)
protected abstract void checkPdfNumber(PdfNumber number)
protected abstract void checkPdfStream(PdfStream stream)
protected abstract void checkPdfString(PdfString string)
protected abstract void checkSymbolicTrueTypeFont(PdfTrueTypeFont trueTypeFont)
protected abstract void checkTrailer(PdfDictionary trailer)
protected void checkResources(PdfDictionary resources)
protected static boolean checkFlag(int flags, int flag)
protected static boolean checkStructure(PdfAConformanceLevel conformanceLevel)
protected static boolean isContainsTransparencyGroup(PdfDictionary dictionary)
dictionary
- the PdfDictionary
to check
PdfName.Group
key and its value is a dictionary with PdfName.Transparency
subtype
protected boolean isAlreadyChecked(PdfDictionary dictionary)
protected void checkResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict)
appearanceStreamsDict
- the dictionary with appearance streams to check.
Copyright © 1998–2021 iText Group NV. All rights reserved.