Mirrored Margins for Duplexing

TECH TIP: Mirrored Margins for Duplex Output

You can create mirrored margins for duplexed output by using the Report.OnStartPage event.

As an example, try adding the following code to dm0061.pas in the main reports demo application:

procedure Tfrm0061.ppOrderListStartPage(Sender: TObject);
begin

  if (ppOrderList.AbsolutePageNo mod 2 > 0) then
    begin
      ppOrderList.Engine.Page.PrinterSetup.MarginLeft  := 0.5;
      ppOrderList.Engine.Page.PrinterSetup.MarginRight := 0;
    end
  else
    begin
      ppOrderList.Engine.Page.PrinterSetup.MarginLeft  :=  0;
      ppOrderList.Engine.Page.PrinterSetup.MarginRight :=  0.5;
    end;

end;