Class PdfUA2LinkChecker
java.lang.Object
com.itextpdf.pdfua.checkers.utils.ua2.PdfUA2LinkChecker
Class that provides methods for checking PDF/UA-2 compliance of link annotations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class that checks the conformance of link annotations while iterating the tag tree structure. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PdfUAValidationContextprivate final Map<PdfObject, Set<IStructureNode>> private final PdfDocument -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePdfUA2LinkChecker(PdfUAValidationContext context, PdfDocument pdfDoc) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckLinkAnnotations(PdfDocument document) Verifies that each link annotation present in the document is tagged.private voidChecks that link annotation is enclosed in either a Link or Reference structure element.private voidChecks that link annotations that target different locations (destinations) are in separate Link or Reference structure elements, and multiple link annotations targeting the same location are included in a single Link or Reference structure element.private PdfArraygetDestination(PdfObject destination) private PdfArraygetDestination(PdfObject destination, Set<PdfObject> checkedDestinations) private PdfObjectgetStructureDestinationObject(PdfDictionary annotObj)
-
Field Details
-
pdfDoc
-
context
-
destinationToStructParentsMap
-
-
Constructor Details
-
PdfUA2LinkChecker
-
-
Method Details
-
checkLinkAnnotations
Verifies that each link annotation present in the document is tagged.- Parameters:
document- thePdfDocumentto check links for
-
checkLinkAnnotationStructureParent
Checks that link annotation is enclosed in either a Link or Reference structure element.Also checks that link annotations that target different locations are in separate Link or Reference structure elements, and multiple link annotations targeting the same location are included in a single Link or Reference structure element.
- Parameters:
elem- link annotation object reference in the structure tree
-
checkStructDestinationsInLinkAndReference
Checks that link annotations that target different locations (destinations) are in separate Link or Reference structure elements, and multiple link annotations targeting the same location are included in a single Link or Reference structure element.- Parameters:
objRef- link annotation object reference in the structure tree
-
getStructureDestinationObject
-
getDestination
-
getDestination
-