PyMuPDF issue: https://github.com/pymupdf/PyMuPDF/issues/4403 Problem file: https://github.com/user-attachments/files/19448199/subset.pdf Almost all viewers exhibit an extended response time. This is the output of mutool draw: $ mutool draw -o test.txt subset.pdf warning: dropping unclosed PDF processor limit error: layer/clip nesting too deep cannot draw 'subset.pdf' Anything that can be / should be done here?
Fixed with: commit 0d48b70f9970c77d133d31a070f437cea70f067bAuthor: Robin Watts <Robin.Watts@artifex.com> Date: Wed Mar 26 13:08:16 2025 +0000 Bug 708373: Record clip/layer nesting more efficiently. The file in question uses multiple (1000+!) nested clip regions. This was running us off the fixed size array. We now store a count of clips at each level rather than 1 per level to avoid this. It is an obscenely structured file, with 1000s of nested (non rectangular) clips.
Confirming that this fix resolves the issue! See PyMuPDF post https://github.com/pymupdf/PyMuPDF/issues/4403#issuecomment-2757572934