Hi ...
I'm trying to restart paging on rtf documents with pgnrestart but having some difficulties, I've been trying to follow http://www.trichview.com/forums/viewtopic.php?t=64 and http://66.225.228.153/~trichvie/forums/ ... php?p=9456 but no luck.
What I'm doing is to get rft files from a db and putting them into a richviewedit with rv.AddNL('\sect\pgnrestart', 1, 0); inbetween.
Is there another example I can look at ?
The code :
{code}
srveEditor.RichViewEdit.Clear;
srveEditor.RichViewEdit.Style.TextStyles.Clear;
srveEditor.RichViewEdit.Style.TextStyles.Add;
srveEditor.RichViewEdit.Style.TextStyles.Add.Options := [rvteoRTFCode];
srveEditor.RichViewEdit.Style.ParaStyles.Clear;
srveEditor.RichViewEdit.Style.ParaStyles.Add;
srveEditor.RichViewEdit.Style.ListStyles.Clear;
while not qQry.Eof do begin
try
lob := TLOBLocator.Create(Connection, otBLOB);
GetLetter(qQry.FieldAsInteger('LETTER'), lob);
srveEditor.RichViewEdit.LoadRTFFromStream(lob);
srveEditor.RichViewEdit.FormatTail;
iIdx := srveEditor.RichViewEdit.ItemCount-1;
iLengd := srveEditor.RichViewEdit.GetOffsAfterItem(iIdx);
srveEditor.RichViewEdit.SetSelectionBounds(iIdx, iLengd, iIdx, iLengd);
srveEditor.RichViewEdit.AddNL('\sect\pgnrestart', 1, 0);
finally
lob.Free;
end;
qQry.Next;
end;
{code}
Delphi XE2 and restart on page count
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 3
- Joined: Tue Sep 11, 2012 3:12 pm
Hi ...
What's wrong exactly is that the numbering does not restart, but if you open the document in ms word the numbering does restarts. So it looks like MS word does see the section break but the RichViewEditor not. Is there anything you see in the code that I'm doing wrong ? Should I do something else ?
Thanks for the assistance.
MG
What's wrong exactly is that the numbering does not restart, but if you open the document in ms word the numbering does restarts. So it looks like MS word does see the section break but the RichViewEditor not. Is there anything you see in the code that I'm doing wrong ? Should I do something else ?
Thanks for the assistance.
MG
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: