Skip to main content

MergeOptions

Version: 9.0

cete.dynamicpdf.merger.mergeoptions

MergeOptions​

Represents options for merging PDF documents.

public class MergeOptions
Public Class MergeOptions

Inheritance: Object → MergeOptions

Licensing​

This class is a DynamicPDF Merger Standard Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Merger for .NET Standard Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

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.Forms;
using ceTe.DynamicPDF.Merger;

class MyClass
{
static void Main()
{
// 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( @"C:\ImportPDF.pdf", 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( @"C:\MyDocument.pdf" );
}
}

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 ()

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.

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.

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

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

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

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

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

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

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

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

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

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

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

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

OptionalContentInfo​

Gets or sets the Output Content should be imported.

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

Property Value​

Boolean

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

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

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

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

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

RootOutline​

Gets or sets the root outline for imported outlines.

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

Property Value​

Outline

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

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.

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 .

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.

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 .

See Also​

ceTe.DynamicPDF.Merger