program ShowPrinterBins;

{$I ..\..\..\Lib\PDFlibDefines.inc}
{$APPTYPE CONSOLE}
{$R *.res}

uses
{$IFDEF XE2+}
  Vcl.Printers,
  System.SysUtils,
{$ELSE}
  Printers,
  SysUtils,
{$ENDIF}
  PDFlibPrinting;

procedure ShowPrinterBin;
var
  BinInfo: AnsiString;
begin
  BinInfo := GetPrinterBins(Printer);

  if BinInfo <> '' then
  begin
    Writeln('Printer Bins:');
    Writeln(BinInfo);
  end
  else
  begin
    Writeln('No bin information available or unable to retrieve printer bins.');
  end;
end;

begin
  try
    ShowPrinterBin;
  except
    on E: Exception do
      Writeln('Error: ', E.Message);
  end;

  // Wait for user to press Enter before exiting
  Write('Press Enter key to exit...');
  Readln;

end.
