|
Tutorial - Merge Options |
Top Previous Next |
|
This example allows to set the merge options to merge documents containing Form Fields.
Add two PDF documents that needs to be merged to a list. These files must contain form fields and bookmarks in them. Using the 'MergeOptions' method can set the properties.
[VB]
'Create a list of documents to Merge Dim DocList() As String ReDim DocList(0 To 2) DocList(0) = InputFile1 DocList(1) = InputFile2 DocList(2) = InputFile4 ' Specify Merge Options. PDFDoc.MergeOptions.IncludeFormFields = False PDFDoc.MergeOptions.IncludeOutlines = True ' Load Documents to merge PDFDoc.MergeDocs (DocList) ' Save the Document PDFDoc.SaveToFile (OutputFile) ' Free the List ReDim DocList(0)
[VC++]
Variant DocList; //Create a list of documents To Merge char **files; files = New char*[2]; files[0] = New char[100]; files[1] = New char[100]; strcpy(files[0], InputFile1); strcpy(files[1], InputFile2); VariantInit(&DocList); // GetVariantFromStrings is a utility Function provided In gtPDFkitUtils.h DocList = GetVariantFromStrings(files, 2); //Load Documents To merge m_PDF.MergeDocs (DocList); m_PDF.SaveToFile (OutputFile);
[CS]
//Create a list of documents To Merge String[] DocList = New String[3]; DocList[0] = InputFile1; DocList[1] = InputFile2; DocList[2] = InputFile4; // Specify Merge Options. PDFDoc.MergeOptions.IncludeFormFields = False; PDFDoc.MergeOptions.IncludeOutlines = True; // Load Documents To merge PDFDoc.MergeDocs (DocList); // Save the Document PDFDoc.SaveToFile (OutputFile);
|