mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 18:33:22 +00:00
bc4f8e2602
content_draws tells whether some content draws an XObject, directly or through a form that has no /Resources of its own and so draws through its caller's. Since #4356 the recursion passed the caller's content again instead of the nested form's decoded data, so a name drawn only inside such a form was never found. Both callers then dropped the entry: unlink_doomed for page-tree resources (Apply Redactions and the content pass of Remove Hidden Information) and prune_doomed_xobjects for surviving forms. An image removed under a mark but still shown elsewhere through such a form went missing from there as well. The recursion reads the nested form's data again, as it did before #4356. Two tests cover the page-tree case and the surviving-form case. Both fail without the fix.