Files
pdfcraft/crates
f540035db3 Issue #124: a long page label no longer overlaps its bookmark title (#328)
* Issue #124: a long page label no longer overlaps its bookmark title

The Bookmarks panel painted the destination's page label right-aligned
with no width limit, while the title's wrap width reserved a fixed 36
px for it. Drawing tools put whole section titles in /PageLabels (the
reporter's file uses "Floor Plans (001 Floor Plans): SITE PLAN" as both
title and label), so the label painted straight over the title.

The label now gets a bounded column (72 px) and is ellipsized on
character boundaries by a pure ellipsized_prefix helper; the title
wraps to the width the column really takes. Short labels ("3", "iv",
"1-1") are unchanged, and a label with no page still shows nothing.

Test: panels.rs::label_column (short labels untouched, long labels cut
to the column with an ellipsis and stay a prefix of the real label,
CJK cut on char boundaries, the loop ends when nothing fits). The
overlap itself is verified against the reporter's file (headless shot
of the Bookmarks panel).

Co-authored-by: Mawfyy <mawfy12@gmail.com>

* Bookmark labels: measure at most 64 characters of a page label

A page label is document text; ellipsizing a huge one character by character laid out
thousands of candidates per row per frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Mawfyy <mawfy12@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:31:31 -04:00
..
2026-10-07 16:03:57 -04:00
2026-10-07 16:03:57 -04:00
2026-10-08 13:06:33 -04:00
2026-10-07 16:03:57 -04:00
2026-10-08 13:06:33 -04:00
2026-10-07 16:03:57 -04:00