program ShowPrinterBinsCli;

{$I ..\..\..\Lib\PDFlibDefines.inc}

{$APPTYPE CONSOLE}

{$R *.res}

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

procedure ShowPrinterBins;
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
    ShowPrinterBins;
  except
    on E: Exception do
      Writeln('Error: ', E.Message);
  end;

end.
