How to Split PDF and Merge PDF in ASP or PHP ?
» 1. ASP Sample Code: Split Merge PDF with ASP
<%
Dim obj
path = server.MapPath(".")
Set obj = CreateObject("PDFSplitMergeX.SplitMergeLib")
obj.SetLicenseKey "Your LicenseKey here"
'split to mutiple files
obj.Split path&"PDF-Split-Merge-ActiveX-DLL.pdf", "", "1,2-3,4-5,6", path&"\split-%d.pdf"
'merge a range a file and another file to a new file
obj.Merge path&"\split-1.pdf|"&path&"\split-2.pdf?1-1", path&"\merge-1.pdf"
Set obj = Nothing
%>
» 2. PHP Sample Code: Split Merge PDF with PHP
<?php
$path = getcwd()."\\";
$com = new COM("PDFSplitMergeX.SplitMergeLib");
$com->SetLicenseKey('Your LicenseKey here');
$com->Split($path."PDF-Split-Merge-ActiveX-DLL.pdf", "", "1,2-3,4-5,6", $path."split-%d.pdf");
$com->Merge($path."split-1.pdf|".$path."split-2.pdf?1-1", $path."merge-1.pdf");
$nPage = $com->GetPageCount($path."PDF-Split-Merge-ActiveX-DLL.pdf", "");
print "Page Count of PDF-Split-Merge-ActiveX-DLL.pdf is ".$nPage;
?>