pdfGetBinNameW
Get a paper bin name (Unicode).
wchar_t *pdfGetBinNameW(wchar_t *printerName, int binIdx, wchar_t *buf, int bufSize)
This function returns the name of the
binIdx
th
available paper bin, on the specified printer.
binIdx
must be between 0 and n-1, where n is the
value returned by pdfGetNumBinsW
.
The bin 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: pdfGetNumBinsW
, pdfGetBinNameW
, and
pdfGetBinIDW
are just simple wrappers around Windows functions.
There is no requirement to use these functions if you already know the
bin ID that you want to use (e.g., from
calling DeviceCapabilities
with the DC_BINS
argument).
C:
wchar_t binName[256];
int nBins, binID, i;
nBins = pdfGetNumBinsW(printerName);
for (i = 0; i < nBins; ++i) {
pdfGetBinNameW(printerName, i, binName, sizeof(binName) / sizeof(wchar_t));
binID = pdfGetBinIDW(printerName, i);
printf("bin %d: id=%d name=%ls\n", i, binID, binName);
}