pdfGetPrinterName
Get a printer name.
char *pdfGetPrinterName(int printerIdx, char *buf, int bufSize)
This function returns the name of
the
printerIdx
th 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).
Returns buf
on success, or NULL
on failure.
Note: pdfGetNumPrinters
and pdfGetPrinterName
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;
char name[256];
nPrinters = pdfGetNumPrinters();
for (i = 0; i < nPrinters; ++i) {
pdfGetPrinterName(i, name, sizeof(name));
printf("printer %d: %s\n", i, name);
}