Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

How do I get a list of the available paper trays for the selected printer?

Question

How do I get a list of the available paper trays for the selected printer?

Answer

In order to get a list of the available paper trays for a printer you need to use the GetPrinterBins function. This function will return a list of the available paper trays and associated values. You can then use the returned value with the SetupCustomPrinter function to print your documents to the relevant paper tray.

Some example Delphi code demonstrating how to do this is shown here:

procedure TForm2.btnGetPrinterBinsClick(Sender: TObject);
var
PrinterName: String;
Bins: String;
begin
    PDFLibrary := TQuickPDF0715.Create;
  try
    UnlockResult := PDFLibrary.UnlockKey('...');
    if UnlockResult = 1 then
    begin
      PrinterName := PDFLibrary.GetDefaultPrinterName();
      Bins := PDFLibrary.GetPrinterBins(PrinterName);
      ShowMessage(Bins);
    end;
  finally
    PDFLibrary.Free;
  end;
end;

© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum