Package com.itextpdf.pdfua.checkers
Class PdfUA1Checker
java.lang.Object
com.itextpdf.pdfua.checkers.PdfUA1Checker
- All Implemented Interfaces:
IValidationChecker
The class defines the requirements of the PDF/UA-1 standard.
The specification implemented by this class is ISO 14289-1
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PdfUAValidationContext
private final HeadingsChecker
private final PdfDocument
private final TagStructureContext
-
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 void
checkCatalog
(PdfCatalog catalog) private void
checkCrypto
(PdfDictionary encryptionDictionary) protected void
checkFileSpec
(PdfDictionary fileSpec) Verify the conformity of the file specification dictionary.private void
checkFonts
(Collection<PdfFont> fontsInDocument) protected void
checkMetadata
(PdfCatalog catalog) private void
private void
checkOCProperties
(PdfDictionary ocProperties) private void
checkOnOpeningBeginMarkedContent
(Object obj, Object extra) private void
private void
checkPdfObject
(PdfObject obj) This method checks the requirements that must be fulfilled by a COS object in a PDF/UA document.private void
private void
checkStructureTreeRoot
(PdfStructTreeRoot structTreeRoot) private void
private void
checkViewerPreferences
(PdfCatalog catalog) private Stack
<Tuple2<PdfName, PdfDictionary>> getTagStack
(Object data) private boolean
isInsideArtifact
(Stack<Tuple2<PdfName, PdfDictionary>> tagStack) private boolean
isInsideRealContent
(Stack<Tuple2<PdfName, PdfDictionary>> tagStack) private boolean
void
validateDocument
(ValidationContext validationContext) Validate the providedValidationContext
.void
validateObject
(Object obj, IsoKey key, PdfResources resources, PdfStream contentStream, Object extra) Check the provided object for conformance.
-
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
-
validateDocument
Validate the providedValidationContext
.This method is called by the
PdfDocument.close()
to check for additional conformance requirements.- Specified by:
validateDocument
in interfaceIValidationChecker
- Parameters:
validationContext
- theValidationContext
to validate
-
validateObject
public void validateObject(Object obj, IsoKey key, PdfResources resources, PdfStream contentStream, Object extra) Check the provided object for conformance.This method is called by the
PdfDocument.checkIsoConformance(Object, IsoKey, PdfResources, PdfStream, Object)
to check for additional conformance requirements.- Specified by:
validateObject
in interfaceIValidationChecker
- Parameters:
obj
- the object to checkkey
- theIsoKey
of the objectresources
- thePdfResources
of the objectcontentStream
- thePdfStream
of the objectextra
- additional information
-
checkFileSpec
Verify the conformity of the file specification dictionary.- Parameters:
fileSpec
- thePdfDictionary
containing file specification to be checked
-
checkText
-
checkMetadata
-
checkViewerPreferences
-
checkOnWritingCanvasToContent
-
getTagStack
-
checkOnOpeningBeginMarkedContent
-
checkStandardRoleMapping
-
isInsideArtifact
-
isInsideRealContent
-
isRealContent
-
checkCatalog
-
checkStructureTreeRoot
-
checkOCProperties
-
checkOCGNameAndASKey
-
checkFonts
-
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
-