Class PdfUA1Checker
java.lang.Object
com.itextpdf.pdfua.checkers.PdfUAChecker
com.itextpdf.pdfua.checkers.PdfUA1Checker
- All Implemented Interfaces:
IValidationChecker
The class defines the requirements of the PDF/UA-1 standard and contains
method implementations from the abstract
PdfUAChecker class.
The specification implemented by this class is ISO 14289-1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PdfUAValidationContextprivate final PdfUA1HeadingsCheckerprivate final PdfDocumentprivate final TagStructureContextFields inherited from class PdfUAChecker
EXCEPTION_SUPPLIER -
Constructor Summary
ConstructorsConstructorDescriptionPdfUA1Checker(PdfDocument pdfDocument) Creates PdfUA1Checker instance with PDF document which will be validated against PDF/UA-1 standard. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckCatalog(PdfCatalog catalog) private voidcheckCrypto(PdfDictionary encryptionDictionary) protected voidcheckFileSpec(PdfDictionary fileSpec) Verify the conformity of the file specification dictionary.(package private) voidcheckLogicalStructureInBMC(Stack<Tuple2<PdfName, PdfDictionary>> stack, Tuple2<PdfName, PdfDictionary> currentBmc, PdfDocument document) Checks if content marked as Artifact resides in Artifact content, but real content does not.protected voidcheckMetadata(PdfCatalog catalog) Checks that theCatalogdictionary of a conforming file (the version number of a file may be any value from 1.0 to 1.7) contains theMetadatakey whose value is a metadata stream.(package private) voidcheckNonSymbolicCmapSubtable(TrueTypeFont fontProgram) For all non-symbolic TrueType fonts used for rendering, the embedded TrueType font program shall contain one or several non-symbolic cmap entries such that all necessary glyph lookups can be carried out.(package private) voidcheckOCProperties(PdfDictionary ocProperties) Checks that all optional content configuration dictionaries in the file, including the default one, shall contain a Name entry (see ISO 32000-2:2020, Table 96, or ISO 32000-1:2008, 8.11.2.1, Table 98) whose value is a non-empty text string when document contains a Configs entry in the OCProperties entry of the document catalog dictionary (see ISO 32000-2:2020, Table 29, or ISO 32000-1:2008, 7.7.2, Table 28), and the Configs entry contains at least one optional content configuration dictionary.private voidcheckPdfObject(PdfObject obj) This method checks the requirements that must be fulfilled by a COS object in a PDF/UA document.private voidprivate voidcheckStructureTreeRoot(PdfStructTreeRoot structTreeRoot) (package private) voidcheckSymbolicCmapSubtable(TrueTypeFont fontProgram) Checks cmap entries present in the embedded TrueType font program of the symbolic TrueType font.booleanisPdfObjectReadyToFlush(PdfObject object) IsPdfObjectready to flush.voidvalidate(IValidationContext context) Validate the providedIValidationContext.Methods inherited from class PdfUAChecker
checkContentInCanvas, checkFonts, checkLang, checkText, checkViewerPreferences, warnOnPageFlush
-
Field Details
-
pdfDocument
-
tagStructureContext
-
headingsChecker
-
context
-
-
Constructor Details
-
PdfUA1Checker
Creates PdfUA1Checker instance with PDF document which will be validated against PDF/UA-1 standard.- Parameters:
pdfDocument- the document to validate
-
-
Method Details
-
validate
Validate the providedIValidationContext..- Parameters:
context- theIValidationContextto validate
-
isPdfObjectReadyToFlush
-
checkFileSpec
Verify the conformity of the file specification dictionary.- Parameters:
fileSpec- thePdfDictionarycontaining file specification to be checked
-
checkMetadata
Checks that theCatalogdictionary of a conforming file (the version number of a file may be any value from 1.0 to 1.7) contains theMetadatakey whose value is a metadata stream. Also checks that the value ofpdfuaid:partis 1 for conforming PDF files.Checks that the
Metadatastream in the document catalog dictionary includes adc:titleentry reflecting the title of the document.- Parameters:
catalog-PdfCatalogdocument catalog dictionary
-
checkOCProperties
Description copied from class:PdfUACheckerChecks that all optional content configuration dictionaries in the file, including the default one, shall contain a Name entry (see ISO 32000-2:2020, Table 96, or ISO 32000-1:2008, 8.11.2.1, Table 98) whose value is a non-empty text string when document contains a Configs entry in the OCProperties entry of the document catalog dictionary (see ISO 32000-2:2020, Table 29, or ISO 32000-1:2008, 7.7.2, Table 28), and the Configs entry contains at least one optional content configuration dictionary.Also checks that the AS key does not appear in any optional content configuration dictionary.
- Overrides:
checkOCPropertiesin classPdfUAChecker- Parameters:
ocProperties- OCProperties entry of the Catalog dictionary
-
checkLogicalStructureInBMC
void checkLogicalStructureInBMC(Stack<Tuple2<PdfName, PdfDictionary>> stack, Tuple2<PdfName, PdfDictionary> currentBmc, PdfDocument document) Description copied from class:PdfUACheckerChecks if content marked as Artifact resides in Artifact content, but real content does not.- Overrides:
checkLogicalStructureInBMCin classPdfUAChecker- Parameters:
stack- the tag structure stackcurrentBmc- the current BMCdocument-PdfDocumentto check
-
checkNonSymbolicCmapSubtable
For all non-symbolic TrueType fonts used for rendering, the embedded TrueType font program shall contain one or several non-symbolic cmap entries such that all necessary glyph lookups can be carried out.- Specified by:
checkNonSymbolicCmapSubtablein classPdfUAChecker- Parameters:
fontProgram- the embedded TrueType font program to check
-
checkSymbolicCmapSubtable
Checks cmap entries present in the embedded TrueType font program of the symbolic TrueType font.The “cmap” table in the embedded font program shall either contain exactly one encoding or it shall contain, at least, the Microsoft Symbol (3,0 – Platform ID = 3, Encoding ID = 0) encoding.
- Specified by:
checkSymbolicCmapSubtablein classPdfUAChecker- Parameters:
fontProgram- the embedded TrueType font program to check
-
checkStandardRoleMapping
-
checkCatalog
-
checkStructureTreeRoot
-
checkCrypto
-
checkPdfObject
This method checks the requirements that must be fulfilled by a COS object in a PDF/UA document.- Parameters:
obj- the COS object that must be checked
-