Files
pdfcraft/crates
Matej Vrzala cfda92233d fix(optimize): keep a destination referenced only through an indirect /Dest (#4212)
Reduce File Size removes named destinations that nothing refers to. It
collected the referenced names by reading /Dest and a GoTo's /D
directly, so when a link's /Dest was an indirect reference to the name
string (valid PDF) rather than the string itself, the name was not
counted. The destination it used was then treated as unreferenced and
deleted, silently breaking the link.

referenced_names now resolves /Dest and /D before reading the name, so
an indirectly referenced destination is kept.

Test: a link whose /Dest is a reference to the name string keeps its
destination through optimize(); an unused destination is still removed.

Reported-by: BS.ehlas.cz
2026-10-23 10:19:17 -04:00
..