Convert a PDF file to a PostScript file.
int pdfConvertToPSFile(PDFHandle pdf, int firstPage, int lastPage, char *psFileName)
This function converts a range of pages from the PDF file to a PostScript file.

Any subset of pages can be selected by specifying the first and last page numbers. See the pdfGetNumPages function. This function returns 0 if it fails - if it cannot create the requested file or printing is prohibited by this PDF file - and 1 on success.

PDFHandle pdf; int err, nPages; err = pdfLoadFile(&pdf, "c:/test/file.pdf"); if (err != pdfOk) { /* handle the error */ } nPages = pdfGetNumPages(pdf); pdfConvertToPSFile(pdf, 1, nPages, "c:/test/file.ps");