Repository navigation
Is there any way to remove drawings? #865
|
Is your feature request related to a problem? Please describe. Describe the solution you'd like Describe alternatives you've considered |
Replies: 4 comments
|
As you know, PyMuPDF is a binding to the library MuPDF, and as such is limited in its features to what MuPDF exposes as base features. Among such features are redaction annotations, and they simply don't cover removing watermarks. Maybe you should submit a request to MuPDF: https://bugs.ghostscript.com/enter_bug.cgi. On the other hand, you sound so confident:
Do you have a specific idea in mind? |
|
If you lookup the definition of redact annots, you will find, that the are supposed to remove everything inside a given retangle. So no matter what they are capable of: they won't ever do what you want ... if they could remove a watermark, they would also remove overlapping text, images, etc. |
|
If you can share your PDF (please no giant file ... maybe extract 1 page only), I am willing to have a look at it. |
|
You kind of have to learn the PDF specification for these tasks (warning: it's huge...) Then, the idea would be something like (extract the content object of the page, parse the data, determine if a drawing command draws on the watermark, remove them) Or load the PDF up in some (commercial?) GUI PDF debugger to figure out which object it is. |
You kind of have to learn the PDF specification for these tasks (warning: it's huge...)
Then, the idea would be something like (extract the content object of the page, parse the data, determine if a drawing command draws on the watermark, remove them)
Or load the PDF up in some (commercial?) GUI PDF debugger to figure out which object it is.