mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 01:57:12 -06:00
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