The SRichViewEdit is generating the Page number by setting the PageProperty PageNoVisible to True (Default).
I want to print the number as 1/5, 2/5,..... like that. I looked at the examples
here , Trichview\TRichView\Demos\Delphi\Assorted\Printing\Printing
The OnpagePrepaint is seen from RvPrint but not for SrvPrint.
Not able to find the right one.
Please help.
ScaleRichview Page Number
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: ScaleRichview Page Number
The recommended way is using header of footer to insert "page number" and "page count" fields.
If you use RichViewActions, you can use TrvActionInsertPageNumber and TrvActionInsertPageCount commands (menu "Insert | Page Number" and "Insert | Page Count").
If you want to do it in code, insert TRVPageNumberItemInfo and TRVPageCountItemInfo (if you need a code sample, let me know).
If you want to draw on a page, use OnPaintPage event. See the demo <TRichView Dir>\ScaleRichView\Demos\Delphi\CustomDraw\Header and Footer\ ).
If you use RichViewActions, you can use TrvActionInsertPageNumber and TrvActionInsertPageCount commands (menu "Insert | Page Number" and "Insert | Page Count").
If you want to do it in code, insert TRVPageNumberItemInfo and TRVPageCountItemInfo (if you need a code sample, let me know).
If you want to draw on a page, use OnPaintPage event. See the demo <TRichView Dir>\ScaleRichView\Demos\Delphi\CustomDraw\Header and Footer\ ).
Re: ScaleRichview Page Number
Dear Sergey,
Thanks for the prompt reply. A Code sample for scalerichview would be much appreciated. I am using the header now. The Scalerichview prints the page number at the bottom of the page by default. An sample code to implement this in scalerichview will be very helpful.
I tried this,
nPageNo := TRVPageNumberItemInfo.Create(FinalData.RichViewEdit.RVData);
nPageCount := TRVPageCountItemInfo.Create(FinalData.RichViewEdit.RVData);
FinalData.Subdocuments[srvhftNormalHeader].AddItem('%d',[nPageNo],0,0);
I am confused about getting the PageCount in page of / pagecount
..
..
..
nPageNo.free
nPageCount.Free;
Thanks in advance.
Regards,
Thanks for the prompt reply. A Code sample for scalerichview would be much appreciated. I am using the header now. The Scalerichview prints the page number at the bottom of the page by default. An sample code to implement this in scalerichview will be very helpful.
I tried this,
nPageNo := TRVPageNumberItemInfo.Create(FinalData.RichViewEdit.RVData);
nPageCount := TRVPageCountItemInfo.Create(FinalData.RichViewEdit.RVData);
FinalData.Subdocuments[srvhftNormalHeader].AddItem('%d',[nPageNo],0,0);
I am confused about getting the PageCount in page of / pagecount
..
..
..
nPageNo.free
nPageCount.Free;
Thanks in advance.
Regards,