pdfGetNumPapers

Get the number of available paper sizes.
int pdfGetNumPapers(char *printerName)
This function returns the number of available paper sizes on the specified printer.

Note: pdfGetNumPapers, pdfGetPaperName, pdfGetPaperID, and pdfGetPaperSize are just simple wrappers around Windows functions. There is no requirement to use these functions if you already know the paper ID that you want to use (e.g., from calling DeviceCapabilities with the DC_PAPERS argument).

C:
char paperName[256]; int nPapers, paperID, w, h, i; nPapers = pdfGetNumPapers(printerName); for (i = 0; i < nPapers; ++i) { pdfGetPaperName(printerName, i, paperName, sizeof(paperName)); paperID = pdfGetPaperID(printerName, i); pdfGetPaperSize(printerName, i, &w, &h); printf("paper %d: id=%d name=%s size=%.1fx%.1fmm\n", i, paperID, paperName, 0.1 * w, 0.1 * h); }
pdfGetPaperName
pdfGetPaperID
pdfGetPaperSize
pdfGetNumPapersW