Force the spool file to be in raw format.
void pdfSetPrintRawSpoolFile(PDFViewerHandle viewer, BOOL raw)
If this function is called with raw = true, XpdfViewer forces spool files to be in raw format. If called with raw = false, the driver's default spool file format - which may be raw, EMF, or something else, depending on the driver - will be used.

The default value is true. Changing this to false is usually a bad idea, unless your application specifically requires it.

pdfSetPrintRawSpoolFile(pdf, FALSE);