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

Duplex printing bug

edited October 2007 in General
Having recently ported an application from Delphi 5 + ReportBuilder 7 to
Delphi 2007 + ReportBuilder 10.06 I've found that the TppPrinterSetup.Duplex
property works as follows:

dpHorizontal prints vertically (book)
dpVertical prints horizontally (tablet)

In the old version it worked fine. That seems to me a bug, isnt'it?

--
Bruno Cuzzi
Metasoft Italy

Comments

  • edited October 2007

    This has to be one of the most confusing properties defined by Windows.
    Customers complained that prior versions of RB had it backwards.

    The TppDuplexType enumerated type definition is now defined to be compatible
    with Delphi's Windows.pas. I suspect that various printer drivers do not
    implement support for the types consistently.

    Windows API docs say....

    DMDUP_VERTICAL - Long-edge binding, that is, the long edge of the page is
    vertical.
    DMDUP_HORIZONTAL - Short-edge binding, that is, the long edge of the page is
    horizontal.

    Delphi's Windows.pas defines the following constants...

    { duplex enable }
    DMDUP_SIMPLEX = 1;
    DMDUP_VERTICAL = 2;
    DMDUP_HORIZONTAL = 3;

    ReportBuilder's ppType.pas defines TppDuplexType as

    TppDuplexType = (dpNone, dpVertical, dpHorizontal);

    Therefore...

    DevMode.dmDuplex := Ord(PrinterSetup.Duplex) + 1;



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.