Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Duplex capability

edited November 2012 in General
Is there a way to tell the duplex capabilities of the selected printer
in the print dialog? I am using Delphi 7 and RB 12.05.

Thanks,
Nick

Comments

  • edited November 2012
    Hi Nick,

    You can access all the printer options by selecting the "properties"
    button of the Print Dialog.

    Duplex can also be controlled from the report designer
    (PrinterSetup.Duplex property).

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2012
    I am actually wanting to check the printer's duplex capability within
    code without the user's input. If the printer being selected in the
    print dialog has the ability to duplex, then I am needing the report to
    behave in a different way.

  • edited November 2012
    var
    FPr: TppPrinter;

    FPr := TppPrinter.Create;

    FPr.PrinterName := 'MyPrinterName';
    FPr.PrinterSetup.DeviceSettings;

    // EG 1
    // get a list ov valid bins
    for i := 0 to FPr.PrinterSetup.BinNames.Count-1 do
    // do something with FPr.PrinterSetup.BinNames[i])

    // EG 2
    // do something if duplex is available
    if FPr.PrinterSetup.PrinterInfo.CanDuplex then
    // do something

    FPr.Free;


    On Wed, 14 Nov 2012 12:54:18 -0600, Nick Vaughan
This discussion has been closed.