Exception while printing

Hi, any ideas what might be causing this problem with printing?

The code was just a quick test by cutting and pasting the code from the first sample in the PDFPrintTest.cpp.html sample code into an existing program

Exception:
Message: Could not create XpsOMObjectFactory
Conditional expression: SUCCEEDED(hr)
Filename : PDFPrintDocSpoolerWin.cpp
Function : trn::PDF::Print::PDFPrintDocSpoolerWin::StartXpsPrintJob
Linenumber : 791

Thanks,
James Dustin

Hi, James!

What platform are you running on? On pre-Vista versions you would need to install the XPS Essentials Pack:

http://www.microsoft.com/en-ca/download/details.aspx?id=11816

Obviously another workaround is to rasterize the document and print the result, as show in the second example of the printer sample:

https://www.pdftron.com/pdfnet/samplecode.html#PDFPrint

Hi Aaron,

I’m trying it on Windows 7.
If it’s any help the windows version is 64bit but the application stack is all 32bit.

I’ll give the rasterize option a try as well.

Thanks,
James