Class RemovalOptions
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.optimization.RemovalOptions
-
public class RemovalOptions extends NativeObject
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConversionStrategygetAnnotations()The conversion strategy for annotations (Getter)ConversionStrategygetFormFields()The conversion strategy for interactive forms (Getter)ConversionStrategygetLinks()The conversion strategy for links (Getter)booleangetRemoveAlternateImages()Whether to remove additional or alternative versions of images (Getter)booleangetRemoveArticleThreads()Whether to remove the sequential flows (threads) of articles (Getter)booleangetRemoveMetadata()Whether to remove document's XMP metadata (Getter)booleangetRemoveOutputIntents()Whether to remove all output intents (Getter)booleangetRemovePieceInfo()Whether to remove the piece-info dictionary (private PDF processor data) (Getter)RemovalStrategygetRemoveSignatureAppearances()Whether to remove or flatten signature appearances (Getter)booleangetRemoveStructureTree()Whether to remove the data describing the logical structure of a PDF (Getter)booleangetRemoveThumbnails()Whether 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)voidsetRemoveSignatureAppearances(RemovalStrategy value)Whether 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 Detail
-
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
public RemovalStrategy 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
public void setRemoveSignatureAppearances(RemovalStrategy value)
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:
java.lang.IllegalArgumentException- ifvalueisnull
-
getAnnotations
public ConversionStrategy 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
public void setAnnotations(ConversionStrategy value)
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:
java.lang.IllegalArgumentException- ifvalueisnull
-
getFormFields
public ConversionStrategy getFormFields()
The conversion strategy for interactive forms (Getter)
Default:ConversionStrategy.COPYin all profiles.
-
setFormFields
public void setFormFields(ConversionStrategy value)
The conversion strategy for interactive forms (Setter)
Default:ConversionStrategy.COPYin all profiles.- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getLinks
public ConversionStrategy getLinks()
The conversion strategy for links (Getter)
Default:ConversionStrategy.COPYin all profiles.
-
setLinks
public void setLinks(ConversionStrategy value)
The conversion strategy for links (Setter)
Default:ConversionStrategy.COPYin all profiles.- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
-