GetPrinterBins

Rendering and printing

Description

This function returns a string containing the bin numbers and names for all the bins (paper trays) available for the specified printer. The string returned contains a line of text for each bin, the lines of text are separated with CR/LF characters. Each line contains a numeric bin number, a comma, and the name of the bin, in double quotes. The bin numbers can be used with the SetupPrinter function.

Syntax

Delphi

Function TPDFlib.GetPrinterBins(Const PrinterName: WideString): WideString;

ActiveX

Function PDFlib::GetPrinterBins(PrinterName As String) As String

DLL

const wchar_t* DLGetPrinterBins(int InstanceID, const wchar_t* PrinterName);
const char* DLGetPrinterBinsA(int InstanceID, const char* PrinterName);

Parameters

PrinterNameThe name of the printer to query. This is the name that appears in the Windows Print Manager. Use the GetPrinterNames function to return a list of valid printers on the system. A value returned by the NewCustomPrinter function can also be used here.

Return values

Returns a string containing the bin numbers and names for all bins of the specified printer, one bin per line.