mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 13:01:29 +00:00
To tell which resources content still draws, redaction reads the forms it follows, and the Type 3 glyph programs, with `Stream::decoded`, which reads `/DecodeParms` only when direct. Behind a predictor whose parameters are an indirect object, a form read as the predictor's tag bytes and row differences instead of its operators. So: - the check of what a page still draws (`resource_ops`), the unlinking check (`content_draws`) and the unlinking from surviving forms' resources (`unlink_from_forms`) didn't see such a form draw an image again, and the image went from resources it is still drawn through; - the Type 3 cleanup didn't see such a form, drawn or not, show a glyph, and dropped the glyph's program; - it refused the redaction over a glyph program behind such a predictor, which it couldn't parse. All six reads now go through `Document::with_direct_parms`. Each has a test, the form or glyph behind a predictor whose parameters are given by reference, that fails with that read reverted: - an_image_a_form_with_parameters_by_reference_draws_again_is_kept (`resource_ops` and `content_draws`); - an_image_a_surviving_form_with_parameters_by_reference_draws_is_kept; - a_type3_glyph_a_form_with_parameters_by_reference_shows_is_kept; - a_type3_glyph_an_undrawn_form_with_parameters_by_reference_shows_is_kept; - an_image_a_type3_glyph_with_parameters_by_reference_draws_is_kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY