MergeOptions

Represents options for merging PDF documents.

public class MergeOptions
Public Class MergeOptions

Inheritance: ObjectMergeOptions

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.
MergeOptions(Boolean)Initializes a new instance of the MergeOptions class.
MergeOptions(Boolean, String)Initializes a new instance of the MergeOptions class.

Properties

AllGets a MergeOptions object with all options set to true.
AllOtherDataGets or sets a value indicating if all other document data should be imported.
AppendGets a MergeOptions object that you would typically use when appending documents.
DocumentInfoGets or sets a value indicating if document information should be imported.
DocumentJavaScriptGets or sets a value indicating if document level JavaScript should be imported.
DocumentPropertiesGets or sets a value indicating if document properties should be imported.
EmbeddedFilesGets or sets a value indicating if the Embedded files should be imported.
FormFieldJavaScriptGets or sets the Form field level JavaScript.
FormFieldsGets or sets a value indicating if form fields should be imported.
FormsXfaDataGets or sets a value indicating if form XFA data should be imported.
LogicalStructureGets or Sets the value indicating if logical structure should be imported.
NoneGets a MergeOptions object with all options set to false.
OpenActionGets or sets a value indicating if the documents opening action (initial page and zoom settings) should be imported.
OptionalContentInfoGets or sets the Output Content should be imported.
OutlinesGets or sets a value indicating if outlines and bookmarks should be imported.
OutputIntentGets or Sets a value indication if OutputIntent should be imported.
PageAnnotationsGets or sets a value indicating if annotations should be imported.
PageJavaScriptGets or sets the Page level JavaScript.
PageLabelsAndSectionsGets or sets a value indicating if page labels and sections should be imported.
RootFormFieldGets or sets the root form field for imported form fields.
RootOutlineGets or sets the root outline for imported outlines.
XmpMetadataGets or sets a value indicating if Xmp Metadata should be imported.

Methods

Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.Merger

In this topic