Using the Component

Installing XpdfSplice

Before using the XpdfSplice component, it must be registered on your system. Normally the installer will take care of that for you. If you need to register manually, you can run the command:
regsvr32 XpdfSplice.dll

Referencing XpdfSplice

To use the XpdfSplice component in a Visual Studio project, select the "References..." command on the "Projects" menu, go to the "COM" tab, and check the box next to XpdfSplice.

Instantiating an XpdfSplice Object

The code needed to instantiate an XpdfSplice object depends on your development environment. In VB6:
Dim pdf As XpdfSplice.XpdfSplice Set pdf = New XpdfSplice.XpdfSplice
In ASP VBScript:
Set pdf = Server.CreateObject("Xpdf.XpdfSplice")
Dim pdf As XpdfSplice.XpdfSplice pdf = New XpdfSplice.XpdfSplice
In C#:
XpdfSplice.XpdfSplice pdf; pdf = new XpdfSplice.XpdfSplice();
In Delphi:
var pdf: IXpdfSplice; begin pdf := CoXpdfSplice_.Create;

Working with XpdfSplice

Using XpdfSplice, you can load input PDF files and copy specific pages into output PDF files. Typical code looks like this:
Dim in1 as Long, in2 as Long Dim out1 as Long, out2 as Long in1 = pdf.openInput("input1.pdf") in2 = pdf.openInput("input2.pdf") out1 = pdf.openOutput("output1.pdf", 1.6) out2 = pdf.openOutput("output2.pdf", 1.6) ' copy page 1 from both input documents to the first output document pdf.addPage in1, 1, out1 pdf.addPage in2, 1, out1 ' copy page 2 from both input documents to the second output document pdf.addPage in1, 2, out2 pdf.addPage in2, 2, out2 pdf.closeInput in1 pdf.closeInput in2 pdf.closeOutput out1 pdf.closeOutput out2