AddArticleThread
Page-level navigation, document properties
Description
Creates one PDF article thread whose beads define the logical reading sequence across one or more page rectangles
The method writes the catalog /Threads array, the thread /F entry, circular /N and /V bead links, page references, rectangles and each page's /B array as required by ISO 32000-1 §12.4.3
Syntax
Function TPDFlib.AddArticleThread(Const Info: TPDFlibArticleThreadInfo; Const Beads: Array Of TPDFlibArticleBead): Integer;Parameters
| Info | Optional title, author, subject, keywords and PDF creation-date metadata; BeadCount is ignored when writing |
|---|---|
| Beads | One or more page rectangles in article reading order |
Return value
Returns the new one-based article-thread index, or 0 when the document, page number, rectangle or an existing article container is invalid
Remarks
Every rectangle uses unscaled PDF user-space coordinates ordered as left, bottom, right and top
Input is validated before objects are added, repeated pages reuse stable page references and the selected page is preserved
DeletePages removes empty threads and repairs the circular links of surviving threads
Example
Info.Title := 'Feature story';
Info.Author := 'Editorial desk';
SetLength(Beads, 2);
Beads[0].Page := 1;
Beads[0].Left := 72;
Beads[0].Bottom := 360;
Beads[0].Right := 288;
Beads[0].Top := 720;
Beads[1].Page := 3;
Beads[1].Left := 72;
Beads[1].Bottom := 360;
Beads[1].Right := 288;
Beads[1].Top := 720;
ThreadIndex := PDF.AddArticleThread(Info, Beads);See also
AddLinkToArticleThread, SetOutlineArticleThread, ArticleThreadCount, GetArticleThreadInfo, GetArticleThreadBead, TPDFlibArticleThreadInfo, TPDFlibArticleBead