StartPageNumberChapter

Page layout, Pagination

Description

Starts a named chapter on the selected page for second-pass page-number placeholders

Syntax

Delphi

Function TPDFlib.StartPageNumberChapter(Const Name: WideString): Integer;

ActiveX

Function PDFlib::StartPageNumberChapter(Name As String) As Long

DLL

int DLStartPageNumberChapter(int InstanceID, const wchar_t* Name);
int DLStartPageNumberChapterA(int InstanceID, const char* Name);

Parameters

NameChapter name supplied to the <%ChapterName%> token

Return values

Returns the one-based chapter identifier, or 0 when no page is selected, the page does not exist, chapter starts are not added in strictly increasing page order, or placeholders were already resolved

Remarks

The chapter extends through the page before the next chapter start or through the final page of the document

Pages before the first explicit chapter use an unnamed implicit chapter that starts on page one

Finish page insertion, deletion, and reordering before resolving placeholders

Example

PDF.StartPageNumberChapter('Introduction');
PDF.AddPageNumberPlaceholder(36, 760, 180, 18,
  '<%ChapterName%> <%ChapterPageNo%>/<%ChapterTotalPages%>', 0);