BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

MergeBatch Method

Merges a sequence of PDF files into one.

Sub MergeBatch(InputFileNames As Variant,
               OutputFileName As String)

void MergeBatch(string[] InputFileNames,
                string OutputFileName)

void MergeBatch(String[] InputFileNames,
                String OutputFileName) throws PDFProcessorException

Parameters

Return Values

N/A.

Remarks

N/A.

Example Usage in VB

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")

' Merge files
Dim FileNames(0 To 3) As String
FileNames(0) = "C:\test\file0001.pdf"
FileNames(1) = "C:\test\file0002.pdf"
FileNames(2) = "C:\test\file0003.pdf"
FileNames(3) = "C:\test\file0004.pdf"
oProcessor.MergeBatch FileNames, "C:\test\output.pdf"

Example Usage in C#

using BCL.easyPDF.Interop.easyPDFProcessor;

PDFProcessor processor = new PDFProcessor();

// Merge files
processor.MergeBatch(new string[4] {
   @"C:\test\file0001.pdf",
   @"C:\test\file0002.pdf",
   @"C:\test\file0003.pdf",
   @"C:\test\file0004.pdf" },
   @"C:\test\output.pdf");

Example Usage in VBScript

Sample 1:

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
files = Split("C:\test\file0001.pdf|C:\test\file0002.pdf",  "|")
Call oProcessor.MergeBatch(files, "C:\test\output.pdf") 

Sample 2:

   Set oProcessor =  CreateObject("easyPDF.PDFProcessor.8")        
   Call oProcessor.MergeBatch(array("C:\test\file0001.pdf",  "C:\test\file0002.pdf"), "C:\test\output.pdf")

Sample 3:

  Set oProcessor =  CreateObject("easyPDF.PDFProcessor.8")       
   Dim files(1) ' this is actually two items, 0 and 1
   files(0) = "C:\test\file0001.pdf"
   files(1) = "C:\test\file0002.pdf"
 Call oProcessor.MergeBatch(files, "C:\test\output.pdf")