Class PageCopyOptions
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.PageCopyOptions
-
public class PageCopyOptions extends NativeObject
The PageCopyOptions determine how page resources are treated when copying a page from an input document to an output document using thePage.copy(com.pdftools.toolbox.pdf.Document, com.pdftools.toolbox.pdf.Page, com.pdftools.toolbox.pdf.PageCopyOptions)andPageList.copy(com.pdftools.toolbox.pdf.Document, com.pdftools.toolbox.pdf.PageList, com.pdftools.toolbox.pdf.PageCopyOptions)methods.
-
-
Constructor Summary
Constructors Constructor Description PageCopyOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CopyStrategygetAnnotations()Copy strategy for annotations.booleangetCopyAssociatedFiles()Copy associated files.booleangetCopyLogicalStructure()Copy the logical structure and tagging information.booleangetCopyOutlineItems()Copy outline items (bookmarks).booleangetDoNotCopyContent()Do not copy page content during duplication.NameConflictResolutiongetFormFieldConflictResolution()Resolution of conflicting form field names.FormFieldCopyStrategygetFormFields()Copy strategy for form fields and widgets.CopyStrategygetLinks()Copy strategy for links.NamedDestinationCopyStrategygetNamedDestinations()Copy strategy for named destinations (Getter)NameConflictResolutiongetOcgConflictResolution()Deprecated.Deprecated in Version 1.0.booleangetOptimizeResources()Find and merge redundant resources.RemovalStrategygetSignedSignatures()Removal strategy for signed signature fields.CopyStrategygetUnsignedSignatures()Copy strategy for unsigned signature fields.voidsetAnnotations(CopyStrategy value)Copy strategy for annotations.voidsetCopyAssociatedFiles(boolean value)Copy associated files.voidsetCopyLogicalStructure(boolean value)Copy the logical structure and tagging information.voidsetCopyOutlineItems(boolean value)Copy outline items (bookmarks).voidsetDoNotCopyContent(boolean value)Do not copy page content during duplication.voidsetFormFieldConflictResolution(NameConflictResolution value)Resolution of conflicting form field names.voidsetFormFields(FormFieldCopyStrategy value)Copy strategy for form fields and widgets.voidsetLinks(CopyStrategy value)Copy strategy for links.voidsetNamedDestinations(NamedDestinationCopyStrategy value)Copy strategy for named destinations (Setter)voidsetOcgConflictResolution(NameConflictResolution value)Deprecated.Deprecated in Version 1.0.voidsetOptimizeResources(boolean value)Find and merge redundant resources.voidsetSignedSignatures(RemovalStrategy value)Removal strategy for signed signature fields.voidsetUnsignedSignatures(CopyStrategy value)Copy strategy for unsigned signature fields.-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getLinks
public CopyStrategy getLinks()
Copy strategy for links. (Getter)
Specifies how links (document internal and external links) are treated when copying a page.
Default value:
CopyStrategy.COPY
-
setLinks
public void setLinks(CopyStrategy value)
Copy strategy for links. (Setter)
Specifies how links (document internal and external links) are treated when copying a page.
Default value:
CopyStrategy.COPY- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getFormFields
public FormFieldCopyStrategy getFormFields()
Copy strategy for form fields and widgets. (Getter)
Specifies how form fields and widgets are treated when copying a page.
Default value:
forms.FormFieldCopyStrategy.COPY
-
setFormFields
public void setFormFields(FormFieldCopyStrategy value)
Copy strategy for form fields and widgets. (Setter)
Specifies how form fields and widgets are treated when copying a page.
Default value:
forms.FormFieldCopyStrategy.COPY- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getSignedSignatures
public RemovalStrategy getSignedSignatures()
Removal strategy for signed signature fields. (Getter)
Signed digital signatures are always invalidated when copying a page and therefore have to be removed. This property specifies, whether the visual representation of the signature is preserved.
Default value:
RemovalStrategy.REMOVE
-
setSignedSignatures
public void setSignedSignatures(RemovalStrategy value)
Removal strategy for signed signature fields. (Setter)
Signed digital signatures are always invalidated when copying a page and therefore have to be removed. This property specifies, whether the visual representation of the signature is preserved.
Default value:
RemovalStrategy.REMOVE- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getUnsignedSignatures
public CopyStrategy getUnsignedSignatures()
Copy strategy for unsigned signature fields. (Getter)
Specifies how signature fields are treated, that are not yet signed.
Default value:
CopyStrategy.COPY
-
setUnsignedSignatures
public void setUnsignedSignatures(CopyStrategy value)
Copy strategy for unsigned signature fields. (Setter)
Specifies how signature fields are treated, that are not yet signed.
Default value:
CopyStrategy.COPY- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getAnnotations
public CopyStrategy getAnnotations()
Copy strategy for annotations. (Getter)
Specifies how interactive annotations (like sticky notes or text highlights) are treated when copying a page. This does not include links, form fields and signature fields which are not considered annotations in this products.
Default value:
CopyStrategy.COPY
-
setAnnotations
public void setAnnotations(CopyStrategy value)
Copy strategy for annotations. (Setter)
Specifies how interactive annotations (like sticky notes or text highlights) are treated when copying a page. This does not include links, form fields and signature fields which are not considered annotations in this products.
Default value:
CopyStrategy.COPY- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getCopyOutlineItems
public boolean getCopyOutlineItems()
Copy outline items (bookmarks). (Getter)
Specifies whether outline items (also known as bookmarks) pointing to the copied page should be copied to the target document automatically.
Default value:
true
-
setCopyOutlineItems
public void setCopyOutlineItems(boolean value)
Copy outline items (bookmarks). (Setter)
Specifies whether outline items (also known as bookmarks) pointing to the copied page should be copied to the target document automatically.
Default value:
true
-
getCopyAssociatedFiles
public boolean getCopyAssociatedFiles()
Copy associated files. (Getter)
Specifies whether embedded files associated with a page or any of its subobjects are also copied when copying the page.
Default value:
true
-
setCopyAssociatedFiles
public void setCopyAssociatedFiles(boolean value)
Copy associated files. (Setter)
Specifies whether embedded files associated with a page or any of its subobjects are also copied when copying the page.
Default value:
true
-
getCopyLogicalStructure
public boolean getCopyLogicalStructure()
Copy the logical structure and tagging information. (Getter)
Specifies whether the logical structure and tagging information associated with a page or its content is also copied when copying the page.
This is required if the target document conformance is PDF/A Level a.
Default value:
true
-
setCopyLogicalStructure
public void setCopyLogicalStructure(boolean value)
Copy the logical structure and tagging information. (Setter)
Specifies whether the logical structure and tagging information associated with a page or its content is also copied when copying the page.
This is required if the target document conformance is PDF/A Level a.
Default value:
true
-
getFormFieldConflictResolution
public NameConflictResolution getFormFieldConflictResolution()
Resolution of conflicting form field names. (Getter)
Form field of different files can have the same name (identifier). This property specifies how name conflicts are resolved, when copying pages from multiple source files.
Default value:
NameConflictResolution.MERGE
-
setFormFieldConflictResolution
public void setFormFieldConflictResolution(NameConflictResolution value)
Resolution of conflicting form field names. (Setter)
Form field of different files can have the same name (identifier). This property specifies how name conflicts are resolved, when copying pages from multiple source files.
Default value:
NameConflictResolution.MERGE- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getOcgConflictResolution
public NameConflictResolution getOcgConflictResolution()
Deprecated.Deprecated in Version 1.0. Setting this property has no effect. When copying pages from multiple documents, layers (optional content groups, OCG) are always merged.
-
setOcgConflictResolution
public void setOcgConflictResolution(NameConflictResolution value)
Deprecated.Deprecated in Version 1.0. Setting this property has no effect. When copying pages from multiple documents, layers (optional content groups, OCG) are always merged.- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getNamedDestinations
public NamedDestinationCopyStrategy getNamedDestinations()
Copy strategy for named destinations (Getter)
Specify whether named destinations are resolved when copying a page.
Default value:
navigation.NamedDestinationCopyStrategy.COPY
-
setNamedDestinations
public void setNamedDestinations(NamedDestinationCopyStrategy value)
Copy strategy for named destinations (Setter)
Specify whether named destinations are resolved when copying a page.
Default value:
navigation.NamedDestinationCopyStrategy.COPY- Throws:
java.lang.IllegalArgumentException- ifvalueisnull
-
getOptimizeResources
public boolean getOptimizeResources()
Find and merge redundant resources. (Getter)
Find and merge redundant resources such as fonts and images. This can lead to much smaller files, especially when copying pages from multiple similar source files. However, it also decreases performance.
Default value:
true
-
setOptimizeResources
public void setOptimizeResources(boolean value)
Find and merge redundant resources. (Setter)
Find and merge redundant resources such as fonts and images. This can lead to much smaller files, especially when copying pages from multiple similar source files. However, it also decreases performance.
Default value:
true
-
getDoNotCopyContent
public boolean getDoNotCopyContent()
Do not copy page content during duplication. (Getter)
Controls whether graphical content is copied when duplicating pages. When false, all visual elements are copied. When true, only non-graphical content elements (annotations, metadata, etc.) are transferred to the new pages.
Default value:
false
-
setDoNotCopyContent
public void setDoNotCopyContent(boolean value)
Do not copy page content during duplication. (Setter)
Controls whether graphical content is copied when duplicating pages. When false, all visual elements are copied. When true, only non-graphical content elements (annotations, metadata, etc.) are transferred to the new pages.
Default value:
false
-
-