SplitDocumentByOutline

Page manipulation

Description

Splits the document at its outline entries

Syntax

Delphi

Function SplitDocumentByOutline(MaxLevel: Integer; Const NameTemplate: WideString): Integer;

Parameters

MaxLevelOutline depth that defines split points; 1 cuts at top-level bookmarks
NameTemplateOutput path template; %p receives the section sequence number

Return values

The number of files written. If writing a section fails, the operation stops and returns the number already written. Check LastErrorCode for the failure reason

Remarks

Each section starts at its bookmark page and ends before the next split point; the last section runs to the final page. The document must have been loaded from a file

See also

ExtractFilePages, SplitDocumentToFiles