Using the Component
Installing XpdfPrint
Before using the XpdfPrint 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 XpdfPrint.dll
Referencing XpdfPrint
To use the XpdfPrint 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 XpdfPrint.Instantiating an XpdfPrint Object
The code needed to instantiate an XpdfPrint object depends on your development environment. In VB6:Dim pdf As XpdfPrint.XpdfPrint
Set pdf = New XpdfPrint.XpdfPrint
In ASP VBScript:
Set pdf = Server.CreateObject("Xpdf.XpdfPrint")
In VB.net:
Dim pdf As XpdfPrint.XpdfPrint
pdf = New XpdfPrint.XpdfPrint()
In C#:
XpdfPrint.XpdfPrint pdf;
pdf = new XpdfPrint.XpdfPrint();
In Delphi:
var
pdf: IXpdfPrint;
begin
pdf := CoXpdfPrint_.Create;
In PowerShell:
$pdf = New-Object -ComObject Xpdf.XpdfPrint
Working with XpdfPrint
Once you've instantiated an XpdfPrint object, you can load PDF files and print them. Typical code looks like this:pdf.loadFile "c:/test/file.pdf"
pdf.printer = "printer55"
pdf.printPDF4