Class PdfAnnotationFlattener


  • public class PdfAnnotationFlattener
    extends java.lang.Object
    Utility class for flattening annotations.

    This class can be used to remove interactive elements from a PDF document.

    • Constructor Detail

      • PdfAnnotationFlattener

        public PdfAnnotationFlattener​(PdfAnnotationFlattenFactory pdfAnnotationFlattenFactory)
        Creates a new instance of PdfAnnotationFlattener.
        Parameters:
        pdfAnnotationFlattenFactory - the factory for creating annotation flatten workers
      • PdfAnnotationFlattener

        public PdfAnnotationFlattener()
        Creates a new instance of PdfAnnotationFlattener. The default factory will be used for creating annotation flatten workers.
    • Method Detail

      • flatten

        public java.util.List<PdfAnnotation> flatten​(java.util.List<PdfAnnotation> annotationsToFlatten)
        Flattens the annotations on the page according to the defined implementation of IAnnotationFlattener.
        Parameters:
        annotationsToFlatten - the annotations that should be flattened.
        Returns:
        the list of annotations that were not flattened successfully
      • flatten

        public java.util.List<PdfAnnotation> flatten​(PdfDocument document)
        Flattens the annotations on the page according to the defined implementation of IAnnotationFlattener.
        Parameters:
        document - the document that contains the annotations that should be flattened.
        Returns:
        the list of annotations that were not flattened successfully