trichview.com

trichview.support




Re: Printing scale


Return to index


Author

Message

Sergey Tkachenko

Posted: 07/31/2004 22:05:36


> It works fine, but I cant undestrand (sorry), how to print next pages at

the

> bottom on the scalled first?

> In this example with scaling size 50% - first page at the top left corner

of

> the page and the second page of the document at the same page but exactly

> under the first.


How to print two pages on the same paper, one below another?


var h: Integer;

begin

  Printer.BeginDoc;

  h := Printer.PageHeight;

  RVPrint1.AssignSource(RichViewEdit1);

  RVPrint1.FormatPages(rvdoAll);

  RVPrint1.ClipMargins := False;

  SetMapMode(Printer.Canvas.Handle,MM_ANISOTROPIC);

  SetWindowExtEx(Printer.Canvas.Handle, 100, 100, nil);

  SetViewportExtEx(Printer.Canvas.Handle, 50, 50, nil);

  SetWindowOrgEx(Printer.Canvas.Handle, 0, 0, nil);

  RVPrint1.rv.DrawPage(1, Printer.Canvas, False, False);

  if RVPrint1.PagesCount>1 then begin

    SetWindowOrgEx(Printer.Canvas.Handle, 0, -h, nil);

    RVPrint1.rv.DrawPage(2, Printer.Canvas, False, False);

  end;

  Printer.EndDoc

end;


(RVPrint1.ClipMargins assignment is important; I wasted tons of paper trying

to understand why it does not work until I find the source of problem :)


>

>  ST> Or you can use the same technique with TRVReportHelper component (in

>  ST> this case, you calculate margins yourself)

>

> I've looked at demos, but it is very difficult for me to understand how to

> make it.


Well, RVReportHelper does not have advantages in this case.





Powered by ABC Amber Outlook Express Converter