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
private boolean
-
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
(Stack<Tuple2<PdfName, PdfDictionary>> stack, Tuple2<PdfName, PdfDictionary> currentBmc) private void
checkOnWritingCanvasToContent
(Stack<Tuple2<PdfName, PdfDictionary>> tagStack) 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 boolean
isInsideArtifact
(Stack<Tuple2<PdfName, PdfDictionary>> tagStack) private boolean
isInsideRealContent
(Stack<Tuple2<PdfName, PdfDictionary>> tagStack) boolean
isPdfObjectReadyToFlush
(PdfObject object) IsPdfObject
ready to flush.private boolean
private PdfMcr
mcrExists
(PdfDocument document, int mcid) void
validate
(IValidationContext context) Validate the providedIValidationContext
.void
Logs a warn on page flushing that page flushing is disabled in PDF/UA mode.
-
Field Details
-
pdfDocument
-
tagStructureContext
-
headingsChecker
-
context
-
warnedOnPageFlush
private boolean warnedOnPageFlush
-
-
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
..- Specified by:
validate
in interfaceIValidationChecker
- Parameters:
context
- theIValidationContext
to validate
-
isPdfObjectReadyToFlush
IsPdfObject
ready to flush..- Specified by:
isPdfObjectReadyToFlush
in interfaceIValidationChecker
- Parameters:
object
- the pdf object to check- Returns:
true
if the object is ready to flush,false
otherwise
-
warnOnPageFlush
public void warnOnPageFlush()Logs a warn on page flushing that page flushing is disabled in PDF/UA mode. -
checkFileSpec
Verify the conformity of the file specification dictionary.- Parameters:
fileSpec
- thePdfDictionary
containing file specification to be checked
-
checkText
-
checkMetadata
-
checkViewerPreferences
-
checkOnWritingCanvasToContent
-
checkOnOpeningBeginMarkedContent
private void checkOnOpeningBeginMarkedContent(Stack<Tuple2<PdfName, PdfDictionary>> stack, Tuple2<PdfName, PdfDictionary> currentBmc) -
checkStandardRoleMapping
-
isInsideArtifact
-
isInsideRealContent
-
isRealContent
-
mcrExists
-
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
-