Link Search Menu Expand Document

Merge PDF Documents - VBScript

PDF Extractor SDK sample in VBScript demonstrating ‘Merge PDF Documents’

MergeDocuments.js
var merger = new ActiveXObject("Bytescout.PDFExtractor.DocumentMerger");
merger.RegistrationName = "demo";
merger.RegistrationKey = "demo";

var comHelpers = new ActiveXObject("Bytescout.PDFExtractor.ComHelpers");

var aFiles = ['.. \ .. \ sample1.pdf', '.. \ .. \ sample2.pdf'];
var compArray = comHelpers.CreateCompatibleArray(aFiles);

filename = 'output.pdf';
merger.Merge(compArray, filename);
merger = null;
MergeDocuments.vbs
' Create Bytescout.PDFExtractor.DocumentMerger object
Set merger = CreateObject("Bytescout.PDFExtractor.DocumentMerger")
merger.RegistrationName = "demo"
merger.RegistrationKey = "demo"

merger.Merge2 "sample1.pdf", "sample2.pdf", "result.pdf"
                
Set merger = Nothing

WScript.Echo "Merged document saved as 'result.pdf'."

Download Source Code (.zip)

Return to the previous page Explore PDF Extractor SDK