trichview.com

trichview.support




Re: How to insert a page break?


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/29/2004 11:59:20


procedure AppendDoc(rv: TCustomRichView; const FileName: String);

var ItemNo: Integer;

     Stream: TFileStream;

begin

  ItemNo := rv.ItemCount;

  Stream := TFileStream.Create(FileName, fmOpenRead);

  rv.InsertRVFFromStream(Stream, ItemNo);

  Stream.Free;

  if (ItemNo>0) and (ItemNo<rv.ItemCount) then

    rv.PageBreaksBeforeItems[ItemNo] := True;

end;



rv.Clear;

AppendDoc(rv, 'file1.rvf');

AppendDoc(rv, 'file2.rvf');

rv.Format;



As for InsertPageBreak, it requires formatted document before it's call, and

iserts pagebreak in the caret position, not in the end of document





Powered by ABC Amber Outlook Express Converter