Get the number of pages printed so far in a print job.
int pdfPrintJobPageCount(PDFHandle jobControlPDF)
This function returns the number of pages printed so far in a print job (which was started by calling the pdfPrintStartJob function).
PDFHandle jobControlPDF, pdf2; /* open the first PDF file, which is also used as the job-control handle */ pdfLoadFile(&jobControlPDF, "c:\\first.pdf"); /* set parameters that apply to the whole job */ pdfPrintSetPrinter(jobControlPDF, L"printer55"); pdfPrintSetDuplex(jobControlPDF, pdfPrintDuplexVert); /* start the print job, using the parameters set above */ pdfPrintStartJob(jobControlPDF); /* print the first section */ pdfPrintSetPages(jobControlPDF, ....); pdfPrintToJob(jobControlPDF, jobControlPDF); /* if the first section had an odd number of pages, add a blank page so that the next section starts on the front side of a sheet */ if (pdfPrintJobPageCount(jobControlPDF) & 1) { pdfPrintBlankPageToJob(jobControlPDF); } /* print the second section */ pdfLoadFile(&pdf2, "c:\\second.pdf"); pdfPrintSetPages(jobControlPDF, ....); pdfPrintToJob(jobControlPDF, pdf2); pdfFree(pdf2); /* finish the print job */ pdfPrintFinishJob(jobControlPDF); pdfFree(jobControlPDF);