Class PdfUA2DestinationsChecker
java.lang.Object
com.itextpdf.pdfua.checkers.utils.ua2.PdfUA2DestinationsChecker
Utility class which performs UA-2 checks related to intra-document destinations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PdfDestinationAdditionContextprivate final PdfDocument -
Constructor Summary
ConstructorsConstructorDescriptionPdfUA2DestinationsChecker(PdfDocument document) CreatesPdfUA2DestinationsCheckerinstance.PdfUA2DestinationsChecker(PdfDestinationAdditionContext context, PdfDocument document) CreatesPdfUA2DestinationsCheckerinstance. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidcheckAllGoToActions(PdfObject object, List<PdfObject> visitedObjects) voidChecks all the destinations in the document.private voidprivate voidcheckDestinationsInOutline(PdfOutline outline) voidChecks specific destination which was recently added.private voidcheckGoToAction(PdfDictionary dictionary) private static booleanisActionAllowed(PdfAction action, PdfDocument document, int counter) private static booleanisDestinationAllowed(PdfDestination destination, PdfDocument document, int counter) private static booleanisDestinationAllowed(PdfNamedDestination namedDestination, PdfDocument document, int counter) private static booleanisDestinationAllowed(PdfStringDestination stringDestination, PdfDocument document, int counter) private static booleanisDestinationAllowed(PdfDictionary destDictionary, PdfDocument document, int counter) private static booleanisDestinationAllowed(PdfObject destinationObject, PdfDocument document, int counter)
-
Field Details
-
context
-
document
-
-
Constructor Details
-
PdfUA2DestinationsChecker
CreatesPdfUA2DestinationsCheckerinstance.- Parameters:
context-PdfDestinationAdditionContextwhich contains destination which was addeddocument-PdfDocumentinstance to which destination was added
-
PdfUA2DestinationsChecker
CreatesPdfUA2DestinationsCheckerinstance.- Parameters:
document-PdfDocumentinstance in which destinations shall be checked
-
-
Method Details
-
checkDestinations
public void checkDestinations()Checks all the destinations in the document. -
checkDestinationsOnCreation
public void checkDestinationsOnCreation()Checks specific destination which was recently added. -
checkDestinationsInLinks
private void checkDestinationsInLinks() -
checkDestinationsInOutline
-
checkAllGoToActions
private void checkAllGoToActions() -
checkAllGoToActions
-
checkGoToAction
-
isDestinationAllowed
private static boolean isDestinationAllowed(PdfObject destinationObject, PdfDocument document, int counter) -
isDestinationAllowed
private static boolean isDestinationAllowed(PdfDictionary destDictionary, PdfDocument document, int counter) -
isActionAllowed
-