pdfGetPrinterPaperName

Get a printer paper size name.
char *pdfGetPrinterPaperName(char *printerName, int paperIdx, char *buf, int bufSize)
This function returns the name of the paperIdxth available paper size, on the specified printer.

paperIdx must be between 0 and n-1, where n is the value returned by pdfGetNumPrinterPapers.

The paper name will be returned in buf (up to bufSize-1 characters).

Returns buf on success, or NULL on failure.

Note: pdfGetNumPrinterPapers, pdfGetPrinterPaperName, and pdfGetPrinterPaperID 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, i; nPapers = pdfGetNumPrinterPapers(printerName); for (i = 0; i < nPapers; ++i) { pdfGetPrinterPaperName(printerName, i, paperName, sizeof(paperName)); paperID = pdfGetPrinterPaperID(printerName, i); printf("paper %d: id=%d name=%s\n", i, paperID, paperName); }
pdfGetNumPrinterPapers
pdfGetPrinterPaperID