I am a newbie evaluating TRichView.
I mainly use TRichView to help me print pictures of the following code:
for i:=1 to 1000 do
begin
jpeg:=tjpegimage.create;
jpeg.LoadFromFile(inttostr(i) + '.jpg');
RichView1.AddPictureEx('', jpeg, -1, rvvaMiddle);
end;
By far I am very satisfied with TRichView to help me insert pictures and print. But I don't know how to insert page break to force a picture to start at a new page. I wonder how I can:
1) Insert pagebreak for a new page;
2) Whether I can determine the distance from a picture to the bottom margin or something like that.
Thanks for any help!
Rgds,
scchui
Insert Pagebreak in TRichView
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This code adds page break befor the picture:
Unfortunately, TRichView does not allow to determine this distance (it's only possible, using undocumented methods, when the document is already formatted for printing, i.e. after RVPrint.FormatPages)
Code: Select all
...
RichView1.AddPictureEx('', jpeg, -1, rvvaMiddle);
RichView1.PageBreaksBeforeItems[RichView1.ItemCount-1] := True;
...