public abstract class PdfAChecker extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Set<com.itextpdf.kernel.pdf.PdfObject> |
checkedObjects
Contains some objects that are already checked.
|
protected Map<com.itextpdf.kernel.pdf.PdfObject,com.itextpdf.kernel.pdf.colorspace.PdfColorSpace> |
checkedObjectsColorspace |
protected boolean |
cmykIsUsed |
protected com.itextpdf.kernel.pdf.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(com.itextpdf.kernel.pdf.PdfAConformanceLevel conformanceLevel) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
checkAction(com.itextpdf.kernel.pdf.PdfDictionary action) |
protected abstract void |
checkAnnotation(com.itextpdf.kernel.pdf.PdfDictionary annotDic) |
abstract void |
checkCanvasStack(char stackOperation)
This method checks compliance with the graphics state architectural
limitation, explained by
maxGsStackDepth. |
protected abstract void |
checkCatalogValidEntries(com.itextpdf.kernel.pdf.PdfDictionary catalogDict) |
abstract void |
checkColor(com.itextpdf.kernel.colors.Color color,
com.itextpdf.kernel.pdf.PdfDictionary currentColorSpaces,
Boolean fill)
This method checks compliance with the color restrictions imposed by the
available color spaces in the document.
|
abstract void |
checkColorSpace(com.itextpdf.kernel.pdf.colorspace.PdfColorSpace colorSpace,
com.itextpdf.kernel.pdf.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() |
void |
checkDocument(com.itextpdf.kernel.pdf.PdfCatalog catalog)
This method checks a number of document-wide requirements of the PDF/A
standard.
|
abstract void |
checkExtGState(com.itextpdf.kernel.pdf.canvas.CanvasGraphicsState extGState)
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(com.itextpdf.kernel.pdf.PdfDictionary fileSpec) |
protected static boolean |
checkFlag(int flags,
int flag) |
abstract void |
checkFont(com.itextpdf.kernel.font.PdfFont pdfFont)
Performs a number of checks on the font.
|
protected abstract void |
checkForm(com.itextpdf.kernel.pdf.PdfDictionary form) |
protected abstract void |
checkFormXObject(com.itextpdf.kernel.pdf.PdfStream form) |
protected abstract void |
checkImage(com.itextpdf.kernel.pdf.PdfStream image,
com.itextpdf.kernel.pdf.PdfDictionary currentColorSpaces) |
abstract void |
checkInlineImage(com.itextpdf.kernel.pdf.PdfStream inlineImage,
com.itextpdf.kernel.pdf.PdfDictionary currentColorSpaces)
This method checks compliance with the inline image restrictions in the
PDF/A specs, specifically filter parameters.
|
protected abstract void |
checkLogicalStructure(com.itextpdf.kernel.pdf.PdfDictionary catalog) |
protected abstract void |
checkMetaData(com.itextpdf.kernel.pdf.PdfDictionary catalog) |
protected abstract void |
checkNonSymbolicTrueTypeFont(com.itextpdf.kernel.font.PdfTrueTypeFont trueTypeFont) |
protected abstract void |
checkOutputIntents(com.itextpdf.kernel.pdf.PdfDictionary catalog) |
protected abstract void |
checkPageObject(com.itextpdf.kernel.pdf.PdfDictionary page,
com.itextpdf.kernel.pdf.PdfDictionary pageResources) |
protected abstract void |
checkPageSize(com.itextpdf.kernel.pdf.PdfDictionary page) |
protected abstract void |
checkPdfNumber(com.itextpdf.kernel.pdf.PdfNumber number) |
void |
checkPdfObject(com.itextpdf.kernel.pdf.PdfObject obj)
This method checks the requirements that must be fulfilled by a COS
object in a PDF/A document.
|
protected abstract void |
checkPdfStream(com.itextpdf.kernel.pdf.PdfStream stream) |
protected abstract void |
checkPdfString(com.itextpdf.kernel.pdf.PdfString string) |
abstract void |
checkRenderingIntent(com.itextpdf.kernel.pdf.PdfName intent)
Checks whether the rendering intent of the document is within the allowed
range of intents.
|
protected void |
checkResources(com.itextpdf.kernel.pdf.PdfDictionary resources) |
protected void |
checkResourcesOfAppearanceStreams(com.itextpdf.kernel.pdf.PdfDictionary appearanceStreamsDict) |
void |
checkSinglePage(com.itextpdf.kernel.pdf.PdfPage page)
This method checks all requirements that must be fulfilled by a page in a
PDF/A document.
|
protected static boolean |
checkStructure(com.itextpdf.kernel.pdf.PdfAConformanceLevel conformanceLevel) |
protected abstract void |
checkSymbolicTrueTypeFont(com.itextpdf.kernel.font.PdfTrueTypeFont trueTypeFont) |
void |
checkTagStructureElement(com.itextpdf.kernel.pdf.PdfObject obj)
This method checks compliance of the tag structure elements, such as struct elements
or parent tree entries.
|
protected abstract void |
checkTrailer(com.itextpdf.kernel.pdf.PdfDictionary trailer) |
protected abstract Set<com.itextpdf.kernel.pdf.PdfName> |
getAllowedNamedActions() |
com.itextpdf.kernel.pdf.PdfAConformanceLevel |
getConformanceLevel()
Gets the
PdfAConformanceLevel for this file. |
protected abstract Set<com.itextpdf.kernel.pdf.PdfName> |
getForbiddenActions() |
protected boolean |
isAlreadyChecked(com.itextpdf.kernel.pdf.PdfDictionary dictionary) |
boolean |
objectIsChecked(com.itextpdf.kernel.pdf.PdfObject object)
Remembers which objects have already been checked, in order to avoid
redundant checks.
|
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 com.itextpdf.kernel.pdf.PdfAConformanceLevel conformanceLevel
protected String pdfAOutputIntentColorSpace
protected int gsStackDepth
protected boolean rgbIsUsed
protected boolean cmykIsUsed
protected boolean grayIsUsed
protected Set<com.itextpdf.kernel.pdf.PdfObject> checkedObjects
protected Map<com.itextpdf.kernel.pdf.PdfObject,com.itextpdf.kernel.pdf.colorspace.PdfColorSpace> checkedObjectsColorspace
protected PdfAChecker(com.itextpdf.kernel.pdf.PdfAConformanceLevel conformanceLevel)
public void checkDocument(com.itextpdf.kernel.pdf.PdfCatalog catalog)
catalog - The catalog being checkedpublic void checkSinglePage(com.itextpdf.kernel.pdf.PdfPage page)
page - the page that must be checkedpublic void checkPdfObject(com.itextpdf.kernel.pdf.PdfObject obj)
obj - the COS object that must be checkedpublic com.itextpdf.kernel.pdf.PdfAConformanceLevel getConformanceLevel()
PdfAConformanceLevel for this file.public boolean objectIsChecked(com.itextpdf.kernel.pdf.PdfObject object)
object - the object to checkpublic void checkTagStructureElement(com.itextpdf.kernel.pdf.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 forpublic abstract void checkInlineImage(com.itextpdf.kernel.pdf.PdfStream inlineImage,
com.itextpdf.kernel.pdf.PdfDictionary currentColorSpaces)
inlineImage - a PdfStream containing the inline imagecurrentColorSpaces - a PdfDictionary containing the color spaces used in the documentpublic abstract void checkColor(com.itextpdf.kernel.colors.Color color,
com.itextpdf.kernel.pdf.PdfDictionary currentColorSpaces,
Boolean fill)
color - the color to checkcurrentColorSpaces - a PdfDictionary containing the color spaces used in the documentfill - whether the color is used for fill or stroke operationspublic abstract void checkColorSpace(com.itextpdf.kernel.pdf.colorspace.PdfColorSpace colorSpace,
com.itextpdf.kernel.pdf.PdfDictionary currentColorSpaces,
boolean checkAlternate,
Boolean fill)
colorSpace - the color space to checkcurrentColorSpaces - a PdfDictionary containing 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 operationspublic abstract void checkRenderingIntent(com.itextpdf.kernel.pdf.PdfName intent)
intent - the intent to be analyzedpublic abstract void checkExtGState(com.itextpdf.kernel.pdf.canvas.CanvasGraphicsState extGState)
extGState - the graphics state to be checkedpublic abstract void checkFont(com.itextpdf.kernel.font.PdfFont pdfFont)
pdfFont - font to be checkedprotected abstract Set<com.itextpdf.kernel.pdf.PdfName> getForbiddenActions()
protected abstract Set<com.itextpdf.kernel.pdf.PdfName> getAllowedNamedActions()
protected abstract void checkAction(com.itextpdf.kernel.pdf.PdfDictionary action)
protected abstract void checkAnnotation(com.itextpdf.kernel.pdf.PdfDictionary annotDic)
protected abstract void checkCatalogValidEntries(com.itextpdf.kernel.pdf.PdfDictionary catalogDict)
protected abstract void checkColorsUsages()
protected abstract void checkImage(com.itextpdf.kernel.pdf.PdfStream image,
com.itextpdf.kernel.pdf.PdfDictionary currentColorSpaces)
protected abstract void checkFileSpec(com.itextpdf.kernel.pdf.PdfDictionary fileSpec)
protected abstract void checkForm(com.itextpdf.kernel.pdf.PdfDictionary form)
protected abstract void checkFormXObject(com.itextpdf.kernel.pdf.PdfStream form)
protected abstract void checkLogicalStructure(com.itextpdf.kernel.pdf.PdfDictionary catalog)
protected abstract void checkMetaData(com.itextpdf.kernel.pdf.PdfDictionary catalog)
protected abstract void checkNonSymbolicTrueTypeFont(com.itextpdf.kernel.font.PdfTrueTypeFont trueTypeFont)
protected abstract void checkOutputIntents(com.itextpdf.kernel.pdf.PdfDictionary catalog)
protected abstract void checkPageObject(com.itextpdf.kernel.pdf.PdfDictionary page,
com.itextpdf.kernel.pdf.PdfDictionary pageResources)
protected abstract void checkPageSize(com.itextpdf.kernel.pdf.PdfDictionary page)
protected abstract void checkPdfNumber(com.itextpdf.kernel.pdf.PdfNumber number)
protected abstract void checkPdfStream(com.itextpdf.kernel.pdf.PdfStream stream)
protected abstract void checkPdfString(com.itextpdf.kernel.pdf.PdfString string)
protected abstract void checkSymbolicTrueTypeFont(com.itextpdf.kernel.font.PdfTrueTypeFont trueTypeFont)
protected abstract void checkTrailer(com.itextpdf.kernel.pdf.PdfDictionary trailer)
protected void checkResources(com.itextpdf.kernel.pdf.PdfDictionary resources)
protected static boolean checkFlag(int flags,
int flag)
protected static boolean checkStructure(com.itextpdf.kernel.pdf.PdfAConformanceLevel conformanceLevel)
protected boolean isAlreadyChecked(com.itextpdf.kernel.pdf.PdfDictionary dictionary)
protected void checkResourcesOfAppearanceStreams(com.itextpdf.kernel.pdf.PdfDictionary appearanceStreamsDict)
Copyright © 1998–2019 iText Group NV. All rights reserved.