Skip to main content

MergeOptions

Version: 12.0

cete.dynamicpdf.merger.mergeoptions

MergeOptions​

Represents options for merging PDF documents.

public class MergeOptions
Public Class MergeOptions

Inheritance: Object → MergeOptions

Licensing Info​

This class is a DynamicPDF Core Suite Essentials feature. One of the following is required for non-evaluation usage:

Examples​

The following example shows how to enter text in a text field specifying the MergeOptions.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Forms
Imports ceTe.DynamicPDF.Merger

Module MyModule

Sub Main()

' Create a MergeOptions object to import the AcroForm
Dim options As MergeOptions = New MergeOptions(True)

' Create a merge document with your PDF containing form fields
Dim MyDocument As MergeDocument = New MergeDocument("C:\ImportPDF.pdf", options)

' Set the value of the text field equal to the string you want to appear
Dim text As TextField = MyDocument.Form.Fields("Text3")
text.Value = "This is my text field"

' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")

End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;
using ceTe.DynamicPDF.Forms;

public class Example
{
public static void CreatePDF(string outputPath, string inputFilePath)
{
// Create a MergeOptions object to import the AcroForm
MergeOptions options = new MergeOptions(true);

// Create a merge document with your PDF containing form fields
MergeDocument document = new MergeDocument(inputFilePath, options);

// Set the value of the text field equal to the string you want to appear
TextField text = (TextField)document.Form.Fields["Text3"];
text.Value = "This is my text field";

// Save the PDF
document.Draw(outputPath);
}
}

Remarks​

Currently the only merge option is whether or not to preserve the form fields on the PDF being merged in.
Specifying true will keep the form fields on the merged PDF where specifying false will remove the form fields from the PDF.

Constructors​

MergeOptions()​

Initializes a new instance of the MergeOptions class.

public MergeOptions()
Public Sub New ()

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

MergeOptions(Boolean)​

Initializes a new instance of the MergeOptions class.

public MergeOptions(bool mergeFormFields)
Public Sub New (mergeFormFields As Boolean)

Parameters​

A value indicating if form fields should be merged.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

MergeOptions(Boolean, String)​

Initializes a new instance of the MergeOptions class.

public MergeOptions(bool mergeFormFields, string rootFormField)
Public Sub New (mergeFormFields As Boolean, rootFormField As String)

Parameters​

A value indicating if form fields should be merged.

The root form field that all merged form fields will be placed under.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Properties​

All​

Gets a MergeOptions object with all options set to true.

public static MergeOptions All { get; }
Public Shared Property All As MergeOptions

Property Value​

MergeOptions

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

AllOtherData​

Gets or sets a value indicating if all other document data should be imported.

public bool AllOtherData { get; set; }
Public Property AllOtherData As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Append​

Gets a MergeOptions object that you would typically use when appending documents.

public static MergeOptions Append { get; }
Public Shared Property Append As MergeOptions

Property Value​

MergeOptions

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

DocumentInfo​

Gets or sets a value indicating if document information should be imported.

public bool DocumentInfo { get; set; }
Public Property DocumentInfo As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

DocumentJavaScript​

Gets or sets a value indicating if document level JavaScript should be imported.

public bool DocumentJavaScript { get; set; }
Public Property DocumentJavaScript As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

DocumentProperties​

Gets or sets a value indicating if document properties should be imported.

public bool DocumentProperties { get; set; }
Public Property DocumentProperties As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

EmbeddedFiles​

Gets or sets a value indicating if the Embedded files should be imported.

public bool EmbeddedFiles { get; set; }
Public Property EmbeddedFiles As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

FormFieldJavaScript​

Gets or sets the Form field level JavaScript.

public bool FormFieldJavaScript { get; set; }
Public Property FormFieldJavaScript As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

FormFields​

Gets or sets a value indicating if form fields should be imported.

public bool FormFields { get; set; }
Public Property FormFields As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

FormsXfaData​

Gets or sets a value indicating if form XFA data should be imported.

public bool FormsXfaData { get; set; }
Public Property FormsXfaData As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

LogicalStructure​

Gets or Sets the value indicating if logical structure should be imported.

public bool LogicalStructure { get; set; }
Public Property LogicalStructure As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

NamedDestinations​

Gets or sets a value indicating if named destinations should be imported.

public bool NamedDestinations { get; set; }
Public Property NamedDestinations As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

None​

Gets a MergeOptions object with all options set to false.

public static MergeOptions None { get; }
Public Shared Property None As MergeOptions

Property Value​

MergeOptions

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

OpenAction​

Gets or sets a value indicating if the documents opening action (initial page and zoom settings) should be imported.

public bool OpenAction { get; set; }
Public Property OpenAction As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

OptionalContentInfo​

Gets or sets the Output Content should be imported.

public bool OptionalContentInfo { get; set; }
Public Property OptionalContentInfo As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Outlines​

Gets or sets a value indicating if outlines and bookmarks should be imported.

public bool Outlines { get; set; }
Public Property Outlines As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

OutputIntent​

Gets or Sets a value indication if OutputIntent should be imported.

public bool OutputIntent { get; set; }
Public Property OutputIntent As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PageAnnotations​

Gets or sets a value indicating if annotations should be imported.

public bool PageAnnotations { get; set; }
Public Property PageAnnotations As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PageJavaScript​

Gets or sets the Page level JavaScript.

public bool PageJavaScript { get; set; }
Public Property PageJavaScript As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PageLabelsAndSections​

Gets or sets a value indicating if page labels and sections should be imported.

public bool PageLabelsAndSections { get; set; }
Public Property PageLabelsAndSections As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

RootFormField​

Gets or sets the root form field for imported form fields.

public string RootFormField { get; set; }
Public Property RootFormField As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

RootOutline​

Gets or sets the root outline for imported outlines.

public Outline RootOutline { get; set; }
Public Property RootOutline As Outline

Property Value​

Outline

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

XmpMetadata​

Gets or sets a value indicating if Xmp Metadata should be imported.

public bool XmpMetadata { get; set; }
Public Property XmpMetadata As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF.Merger