Using the Component

Installing XpdfRasterizer

Before using the XpdfRasterizer 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 XpdfRasterizer.dll

Referencing XpdfRasterizer

To use the XpdfRasterizer 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 XpdfRasterizer.

Instantiating an XpdfRasterizer Object

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

Working with XpdfRasterizer

Once you've instantiated an XpdfRasterizer object, you can load PDF files and convert pages to images. Typical code looks like this:
pdf.loadFile "c:/test/file.pdf" pdf.writePageBitmap 1, 120, pdf.imageRGB, pdf.imageFileBMP, "c:/test/page1.bmp"