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, BottomThe same geometry that will be passed to DrawTOC.

Return values

PagesHow many pages are needed.
0No 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.

See also

DrawTOC, InsertPages