Is any chance to create index of RVF document witch page number marks where is inserted on top of RVF document? (like as MS WORD). I am using list styles with levels and i would like to use them for creating index of document.
Thaks. Josef.
Create index of document
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This functionality is not supported.
I can explain how it's possible to implement it.
You need to build a table of contents/index yourself. To do it, you need to know page number where the specified item located.
If you want to insert TOC/index at the beginning, you must take into account that they will occupy one or more pages too, so you need to add this number of pages to get the resulting values.
So, you have some item and know its ItemNo (index in the document, from 0 to SRichViewEdit.RichViewEdit.ItemCount-1). How to get its page? Unfortunately, ScaleRichView does not have methods returing a page number by an ItemNo. But it has methods working with DrawItemNo (index of "drawing item"):
getPageStartDrawItemNo(PageNo : Integer) : Integer
You can convert ItemNo to DrawItemNo using
SRichViewEdit.RichViewEdit.RVData.Item2FirstDrawItem(ItemNo, DrawItemNo). Document must be formatted, otherwise this method fails.
I can explain how it's possible to implement it.
You need to build a table of contents/index yourself. To do it, you need to know page number where the specified item located.
If you want to insert TOC/index at the beginning, you must take into account that they will occupy one or more pages too, so you need to add this number of pages to get the resulting values.
So, you have some item and know its ItemNo (index in the document, from 0 to SRichViewEdit.RichViewEdit.ItemCount-1). How to get its page? Unfortunately, ScaleRichView does not have methods returing a page number by an ItemNo. But it has methods working with DrawItemNo (index of "drawing item"):
Code: Select all
// DrawItemNo --> page number
getRVPageNoEx(DrawItemNo : Integer): Integer
// Page number --> the first DrawItemNo on page
You can convert ItemNo to DrawItemNo using
SRichViewEdit.RichViewEdit.RVData.Item2FirstDrawItem(ItemNo, DrawItemNo). Document must be formatted, otherwise this method fails.