mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-30 13:08:48 -06:00
Bookmark options > New bookmarks from text styles... lists the styles the document's text is set in (font without its subset tag, the size shown, bold, italic, how many lines, a sample), the largest first, and takes one style per bookmark level. Every line in a level's style becomes a bookmark of that level under a new first "Untitled" bookmark, as from structure; a heading set on several rows is one bookmark, and each goes to the top of its heading. The detection lives in engine::text_style_bookmarks on top of edit::text_lines, reading each page top to bottom then left to right, so two headings on one row stay two. text_styles and bookmark_from_text_styles reach it headlessly, and the command bookmark.from_text_styles opens the dialog. OutlineEntry gets an optional top for the /XYZ destination; structure bookmarks keep theirs.