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 ConversionStrategy
getAnnotations()
The conversion strategy for annotations (Getter)ConversionStrategy
getFormFields()
The conversion strategy for interactive forms (Getter)ConversionStrategy
getLinks()
The conversion strategy for links (Getter)boolean
getRemoveAlternateImages()
Whether to remove additional or alternative versions of images (Getter)boolean
getRemoveArticleThreads()
Whether to remove the sequential flows (threads) of articles (Getter)boolean
getRemoveMetadata()
Whether to remove document's XMP metadata (Getter)boolean
getRemoveOutputIntents()
Whether to remove all output intents (Getter)boolean
getRemovePieceInfo()
Whether to remove the piece-info dictionary (private PDF processor data) (Getter)RemovalStrategy
getRemoveSignatureAppearances()
Whether to remove or flatten signature appearances (Getter)boolean
getRemoveStructureTree()
Whether to remove the data describing the logical structure of a PDF (Getter)boolean
getRemoveThumbnails()
Whether to remove thumbnail images which represent the PDF pages in miniature form (Getter)void
setAnnotations(ConversionStrategy value)
The conversion strategy for annotations (Setter)void
setFormFields(ConversionStrategy value)
The conversion strategy for interactive forms (Setter)void
setLinks(ConversionStrategy value)
The conversion strategy for links (Setter)void
setRemoveAlternateImages(boolean value)
Whether to remove additional or alternative versions of images (Setter)void
setRemoveArticleThreads(boolean value)
Whether to remove the sequential flows (threads) of articles (Setter)void
setRemoveMetadata(boolean value)
Whether to remove document's XMP metadata (Setter)void
setRemoveOutputIntents(boolean value)
Whether to remove all output intents (Setter)void
setRemovePieceInfo(boolean value)
Whether to remove the piece-info dictionary (private PDF processor data) (Setter)void
setRemoveSignatureAppearances(RemovalStrategy value)
Whether to remove or flatten signature appearances (Setter)void
setRemoveStructureTree(boolean value)
Whether to remove the data describing the logical structure of a PDF (Setter)void
setRemoveThumbnails(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:false
except in the profileprofiles.Print
.
-
setRemoveAlternateImages
public void setRemoveAlternateImages(boolean value)
Whether to remove additional or alternative versions of images (Setter)
Default:false
except in the profileprofiles.Print
.
-
getRemoveArticleThreads
public boolean getRemoveArticleThreads()
Whether to remove the sequential flows (threads) of articles (Getter)
Default:true
except in the profileprofiles.Archive
.
-
setRemoveArticleThreads
public void setRemoveArticleThreads(boolean value)
Whether to remove the sequential flows (threads) of articles (Setter)
Default:true
except in the profileprofiles.Archive
.
-
getRemoveMetadata
public boolean getRemoveMetadata()
Whether to remove document's XMP metadata (Getter)
Default:-
profiles.Web
profile:true
-
profiles.Print
profile:false
-
profiles.Archive
profile:false
-
profiles.MinimalFileSize
profile:true
-
profiles.Mrc
profile:false
-
-
setRemoveMetadata
public void setRemoveMetadata(boolean value)
Whether to remove document's XMP metadata (Setter)
Default:-
profiles.Web
profile:true
-
profiles.Print
profile:false
-
profiles.Archive
profile:false
-
profiles.MinimalFileSize
profile:true
-
profiles.Mrc
profile: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:
false
except 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:
false
except 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:
true
except 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:
true
except 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:
true
except 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:
true
except in the profileprofiles.Archive
.
-
getRemoveThumbnails
public boolean getRemoveThumbnails()
Whether to remove thumbnail images which represent the PDF pages in miniature form (Getter)
Default:true
in all profiles.
-
setRemoveThumbnails
public void setRemoveThumbnails(boolean value)
Whether to remove thumbnail images which represent the PDF pages in miniature form (Setter)
Default:true
in 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.FLATTEN
in 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.FLATTEN
in all profiles.- Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
-
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.COPY
in 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.COPY
in all profiles.- Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
-
getFormFields
public ConversionStrategy getFormFields()
The conversion strategy for interactive forms (Getter)
Default:ConversionStrategy.COPY
in all profiles.
-
setFormFields
public void setFormFields(ConversionStrategy value)
The conversion strategy for interactive forms (Setter)
Default:ConversionStrategy.COPY
in all profiles.- Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
-
getLinks
public ConversionStrategy getLinks()
The conversion strategy for links (Getter)
Default:ConversionStrategy.COPY
in all profiles.
-
setLinks
public void setLinks(ConversionStrategy value)
The conversion strategy for links (Setter)
Default:ConversionStrategy.COPY
in all profiles.- Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
-
-