Class AnnotationsDistiller

java.lang.Object
org.sejda.impl.sambox.component.AnnotationsDistiller

public final class AnnotationsDistiller extends Object
Component that can distill pages annotations filtering out those pointing to irrelevant pages and updating the annotationsif necessasy.
Author:
Andrea Vacondio
  • Constructor Summary

    Constructors
    Constructor
    Description
    AnnotationsDistiller(org.sejda.sambox.pdmodel.PDDocument document)
    Document where pages and annotations come from, it's used to resolve named destinations.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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