java.lang.Object
org.sejda.impl.sambox.component.AnnotationsDistiller
Component that can distill pages annotations filtering out those pointing to irrelevant pages and updating the annotationsif necessasy.
- Author:
- Andrea Vacondio
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationsDistiller(org.sejda.sambox.pdmodel.PDDocument document) Document where pages and annotations come from, it's used to resolve named destinations. -
Method Summary
Modifier and TypeMethodDescriptionorg.sejda.commons.LookupTable<org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotation>retainRelevantAnnotations(org.sejda.commons.LookupTable<org.sejda.sambox.pdmodel.PDPage> relevantPages) Removes from the given set of pages all the annotations pointing to a page that is not in the lookup (an irrelevant page) and replaces annotations pointing to an old page with a new one pointing to the looked up page.
-
Constructor Details
-
AnnotationsDistiller
public AnnotationsDistiller(org.sejda.sambox.pdmodel.PDDocument document) Document where pages and annotations come from, it's used to resolve named destinations.- Parameters:
document-
-
-
Method Details
-
retainRelevantAnnotations
public org.sejda.commons.LookupTable<org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotation> retainRelevantAnnotations(org.sejda.commons.LookupTable<org.sejda.sambox.pdmodel.PDPage> relevantPages) Removes from the given set of pages all the annotations pointing to a page that is not in the lookup (an irrelevant page) and replaces annotations pointing to an old page with a new one pointing to the looked up page.- Parameters:
relevantPages-- Returns:
- the lookup table to retrieve newly created annotations based on the old ones
-