pdfGetPrinterNameW

Get a printer name (Unicode).
wchar_t *pdfGetPrinterNameW(int printerIdx, wchar_t *buf, int bufSize)
This function returns the name of the printerIdxth available printer.

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

The printer name will be returned in buf (up to bufSize-1 characters). Note: bufSize is the number of Unicode (wide) characters in buf, not the number of bytes.

Returns buf on success, or NULL on failure.

Note: pdfGetNumPrinters and pdfGetPrinterNameW are just simple wrappers around Windows functions. There is no requirement to use these functions if you already know the printer name that you want to use.

C:
int nPrinters, i; wchar_t name[256]; nPrinters = pdfGetNumPrinters(); for (i = 0; i < nPrinters; ++i) { pdfGetPrinterNameW(i, name, sizeof(name) / sizeof(wchar_t)); printf("printer %d: %ls\n", i, name); }
pdfGetNumPrinters
pdfGetPrinterName