You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have several PDF files from customers, and using remove_text can cause infinite looping. Upon investigation, I discovered a corner case where elt["/Resources"] has a circular relation, which can result in calling clean_forms(content, stack + [elt]) infinitely.
I proposed keeping a memory variable visited_resources to keep track of which elt["/Resources"] has been processed and to avoid infinite looping.
The corner case files are private and cannot be shared, but I believe many people would encounter the same problem.
The text was updated successfully, but these errors were encountered:
stefan6419846
added
is-bug
From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF
PdfWriter
The PdfWriter component is affected
labels
Feb 27, 2024
I have several PDF files from customers, and using remove_text can cause infinite looping. Upon investigation, I discovered a corner case where elt["/Resources"] has a circular relation, which can result in calling clean_forms(content, stack + [elt]) infinitely.
I proposed keeping a memory variable visited_resources to keep track of which elt["/Resources"] has been processed and to avoid infinite looping.
The corner case files are private and cannot be shared, but I believe many people would encounter the same problem.
The text was updated successfully, but these errors were encountered: