Class RemovalOptions
The parameters defining the optional data to remove or flatten
Removal options specify the PDF data structures to copy or remove, e.g. article threads, metadata, or alternate images.
In addition, the visual appearances of signatures, annotations, form fields, and links can be flattened.
Flattening means, that the appearance of such a data structure is drawn as
non-editable graphic onto the page; for visual appearances of signatures,
flattening has a slightly different meaning
(see property getRemoveSignatureAppearances()).
-
Method Summary
Modifier and TypeMethodDescriptionThe conversion strategy for annotations (Getter)The conversion strategy for interactive forms (Getter)getLinks()The conversion strategy for links (Getter)booleanWhether to remove additional or alternative versions of images (Getter)booleanWhether to remove the sequential flows (threads) of articles (Getter)booleanWhether to remove document's XMP metadata (Getter)booleanWhether to remove all output intents (Getter)booleanWhether to remove the piece-info dictionary (private PDF processor data) (Getter)Whether to remove or flatten signature appearances (Getter)booleanWhether to remove the data describing the logical structure of a PDF (Getter)booleanWhether to remove thumbnail images which represent the PDF pages in miniature form (Getter)voidsetAnnotations(ConversionStrategy value) The conversion strategy for annotations (Setter)voidsetFormFields(ConversionStrategy value) The conversion strategy for interactive forms (Setter)voidsetLinks(ConversionStrategy value) The conversion strategy for links (Setter)voidsetRemoveAlternateImages(boolean value) Whether to remove additional or alternative versions of images (Setter)voidsetRemoveArticleThreads(boolean value) Whether to remove the sequential flows (threads) of articles (Setter)voidsetRemoveMetadata(boolean value) Whether to remove document's XMP metadata (Setter)voidsetRemoveOutputIntents(boolean value) Whether to remove all output intents (Setter)voidsetRemovePieceInfo(boolean value) Whether to remove the piece-info dictionary (private PDF processor data) (Setter)voidWhether to remove or flatten signature appearances (Setter)voidsetRemoveStructureTree(boolean value) Whether to remove the data describing the logical structure of a PDF (Setter)voidsetRemoveThumbnails(boolean value) Whether to remove thumbnail images which represent the PDF pages in miniature form (Setter)Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Method Details
-
getRemoveAlternateImages
public boolean getRemoveAlternateImages()Whether to remove additional or alternative versions of images (Getter)
Default:falseexcept in the profileprofiles.Print. -
setRemoveAlternateImages
public void setRemoveAlternateImages(boolean value) Whether to remove additional or alternative versions of images (Setter)
Default:falseexcept in the profileprofiles.Print. -
getRemoveArticleThreads
public boolean getRemoveArticleThreads()Whether to remove the sequential flows (threads) of articles (Getter)
Default:trueexcept in the profileprofiles.Archive. -
setRemoveArticleThreads
public void setRemoveArticleThreads(boolean value) Whether to remove the sequential flows (threads) of articles (Setter)
Default:trueexcept in the profileprofiles.Archive. -
getRemoveMetadata
public boolean getRemoveMetadata()Whether to remove document's XMP metadata (Getter)
Default:-
profiles.Webprofile:true -
profiles.Printprofile:false -
profiles.Archiveprofile:false -
profiles.MinimalFileSizeprofile:true -
profiles.Mrcprofile:false
-
-
setRemoveMetadata
public void setRemoveMetadata(boolean value) Whether to remove document's XMP metadata (Setter)
Default:-
profiles.Webprofile:true -
profiles.Printprofile:false -
profiles.Archiveprofile:false -
profiles.MinimalFileSizeprofile:true -
profiles.Mrcprofile:false
-
-
getRemoveOutputIntents
public boolean getRemoveOutputIntents()Whether to remove all output intents (Getter)
Output intents provide a means for matching the color characteristics of PDF page content with those of a target output device or production environment in which the document will be printed.
Default:
falseexcept in the profileprofiles.MinimalFileSize. -
setRemoveOutputIntents
public void setRemoveOutputIntents(boolean value) Whether to remove all output intents (Setter)
Output intents provide a means for matching the color characteristics of PDF page content with those of a target output device or production environment in which the document will be printed.
Default:
falseexcept in the profileprofiles.MinimalFileSize. -
getRemovePieceInfo
public boolean getRemovePieceInfo()Whether to remove the piece-info dictionary (private PDF processor data) (Getter)
The removal of this proprietary application data has no effect on the document's visual appearance.
Default:
trueexcept in the profileprofiles.Archive. -
setRemovePieceInfo
public void setRemovePieceInfo(boolean value) Whether to remove the piece-info dictionary (private PDF processor data) (Setter)
The removal of this proprietary application data has no effect on the document's visual appearance.
Default:
trueexcept in the profileprofiles.Archive. -
getRemoveStructureTree
public boolean getRemoveStructureTree()Whether to remove the data describing the logical structure of a PDF (Getter)
The logical structure of the document is a description of the content of its pages. It consists of a fine granular hierarchical tagging that distinguishes between the actual content and artifacts (such as page numbers, layout artifacts, etc.). The tagging provides a meaningful description, for example "This is a header", "This color image shows a small sailing boat at sunset", etc. This information can be used e.g. to read the document to the visually impaired.
Default:
trueexcept in the profileprofiles.Archive. -
setRemoveStructureTree
public void setRemoveStructureTree(boolean value) Whether to remove the data describing the logical structure of a PDF (Setter)
The logical structure of the document is a description of the content of its pages. It consists of a fine granular hierarchical tagging that distinguishes between the actual content and artifacts (such as page numbers, layout artifacts, etc.). The tagging provides a meaningful description, for example "This is a header", "This color image shows a small sailing boat at sunset", etc. This information can be used e.g. to read the document to the visually impaired.
Default:
trueexcept in the profileprofiles.Archive. -
getRemoveThumbnails
public boolean getRemoveThumbnails()Whether to remove thumbnail images which represent the PDF pages in miniature form (Getter)
Default:truein all profiles. -
setRemoveThumbnails
public void setRemoveThumbnails(boolean value) Whether to remove thumbnail images which represent the PDF pages in miniature form (Setter)
Default:truein all profiles. -
getRemoveSignatureAppearances
Whether to remove or flatten signature appearances (Getter)
A signature in a PDF consist of two parts:
- (a) The invisible digital signature in the PDF.
- (b) The visual appearance that was attributed to the signature.
Part (a) can be used by a viewing application, to verify that the PDF has not changed since it has been signed and report this to the user.
During optimizing, the PDF is altered and hence its digital signature (a) is broken and must be removed.
-
RemovalStrategy.FLATTEN: (a) is removed and (b) is drawn as non-editable graphic onto the page. Within the context of signatures this is called "flattening". -
RemovalStrategy.REMOVE: (a) and (b) are removed.
Default:
RemovalStrategy.FLATTENin all profiles. -
setRemoveSignatureAppearances
Whether to remove or flatten signature appearances (Setter)
A signature in a PDF consist of two parts:
- (a) The invisible digital signature in the PDF.
- (b) The visual appearance that was attributed to the signature.
Part (a) can be used by a viewing application, to verify that the PDF has not changed since it has been signed and report this to the user.
During optimizing, the PDF is altered and hence its digital signature (a) is broken and must be removed.
-
RemovalStrategy.FLATTEN: (a) is removed and (b) is drawn as non-editable graphic onto the page. Within the context of signatures this is called "flattening". -
RemovalStrategy.REMOVE: (a) and (b) are removed.
Default:
RemovalStrategy.FLATTENin all profiles.- Throws:
IllegalArgumentException- ifvalueisnull
-
getAnnotations
The conversion strategy for annotations (Getter)
The conversion strategy for annotations.
Annotations in PDF are interactive elements on the pages, such as:
- Sticky notes
- Free text annotations
- Line, square, circle, and polygon annotations
- Highlight, underline and strikeout annotations
- Stamp annotations
- Ink annotations
- File attachment annotation
- Sound and movie annotations
- 3D annotations
Note that this does not include form fields (see
getFormFields()) and links (seegetLinks()).Default:
ConversionStrategy.COPYin all profiles. -
setAnnotations
The conversion strategy for annotations (Setter)
The conversion strategy for annotations.
Annotations in PDF are interactive elements on the pages, such as:
- Sticky notes
- Free text annotations
- Line, square, circle, and polygon annotations
- Highlight, underline and strikeout annotations
- Stamp annotations
- Ink annotations
- File attachment annotation
- Sound and movie annotations
- 3D annotations
Note that this does not include form fields (see
getFormFields()) and links (seegetLinks()).Default:
ConversionStrategy.COPYin all profiles.- Throws:
IllegalArgumentException- ifvalueisnull
-
getFormFields
The conversion strategy for interactive forms (Getter)
Default:ConversionStrategy.COPYin all profiles. -
setFormFields
The conversion strategy for interactive forms (Setter)
Default:ConversionStrategy.COPYin all profiles.- Throws:
IllegalArgumentException- ifvalueisnull
-
getLinks
The conversion strategy for links (Getter)
Default:ConversionStrategy.COPYin all profiles. -
setLinks
The conversion strategy for links (Setter)
Default:ConversionStrategy.COPYin all profiles.- Throws:
IllegalArgumentException- ifvalueisnull
-