MeasureTOC
Page layout
Description
Reports how many pages the table of contents will need.
Syntax
Delphi
Function TPDFlib.MeasureTOC(Left, Top, Right, Bottom: Double): Integer;Parameters
| Left, Top, Right, Bottom | The same geometry that will be passed to DrawTOC. |
|---|
Return values
| Pages | How many pages are needed. |
|---|---|
| 0 | No headings are registered, or there is no room between Top and Bottom. |
Remarks
Call this before inserting the contents pages, so the right number can be inserted in one go and the page numbers the entries resolve to are final.