Package com.itextpdf.kernel.utils
Class PdfAnnotationFlattener
- java.lang.Object
-
- com.itextpdf.kernel.utils.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.
-
-
Field Summary
Fields Modifier and Type Field Description private PdfAnnotationFlattenFactory
pdfAnnotationFlattenFactory
-
Constructor Summary
Constructors Constructor Description PdfAnnotationFlattener()
Creates a new instance ofPdfAnnotationFlattener
.PdfAnnotationFlattener(PdfAnnotationFlattenFactory pdfAnnotationFlattenFactory)
Creates a new instance ofPdfAnnotationFlattener
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<PdfAnnotation>
flatten(PdfDocument document)
Flattens the annotations on the page according to the defined implementation ofIAnnotationFlattener
.java.util.List<PdfAnnotation>
flatten(java.util.List<PdfAnnotation> annotationsToFlatten)
Flattens the annotations on the page according to the defined implementation ofIAnnotationFlattener
.
-
-
-
Field Detail
-
pdfAnnotationFlattenFactory
private final PdfAnnotationFlattenFactory pdfAnnotationFlattenFactory
-
-
Constructor Detail
-
PdfAnnotationFlattener
public PdfAnnotationFlattener(PdfAnnotationFlattenFactory pdfAnnotationFlattenFactory)
Creates a new instance ofPdfAnnotationFlattener
.- Parameters:
pdfAnnotationFlattenFactory
- the factory for creating annotation flatten workers
-
PdfAnnotationFlattener
public PdfAnnotationFlattener()
Creates a new instance ofPdfAnnotationFlattener
. 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 ofIAnnotationFlattener
.- 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 ofIAnnotationFlattener
.- Parameters:
document
- the document that contains the annotations that should be flattened.- Returns:
- the list of annotations that were not flattened successfully
-
-