Article 58ZXG How to remove the watermark of several PDFs using the terminal on Linux?

How to remove the watermark of several PDFs using the terminal on Linux?

by
Moshpirit
from LinuxQuestions.org on (#58ZXG)
I have the watermark picture as a PNG in a folder and the watermarked PDFs, is there any way to remove this big PNG picture right now embed in these PDFs using the terminal?

- I made a research and found this post asking for a script with pdftk but it doesn't seem to work since it seems to apply just to text watermarks.
- Here is a Slack Exchange post with GhostScript but I'm not sure if this could work for me since I don't want to remove all pictures, just one picture (that appears in every page).
- I extracted the watermark with LibreOffice Draw, so I have the sample watermark as a PNG but if I try to remove all the watermarks manually the formulas get seriously screwed and it's a very hard word because there are a lot of PDFs.
- Despeck works only for a very specific situation and mine it's not this one. Unfortunately seems like the watermark has to be colored and mine it's not (it's grey).

Here's one of the documents, it's some notes from an old website (no longer available). I wanted to print them and study them but the watermark make it very tedious.

I thought about some script that could remove big dimensions images or images that looks like this extracted picture.latest?d=yIl2AUoC8zA latest?i=QyGhm18t2SM:xEJt0pE87NI:F7zBnMy latest?i=QyGhm18t2SM:xEJt0pE87NI:V_sGLiP latest?d=qj6IDK7rITs latest?i=QyGhm18t2SM:xEJt0pE87NI:gIN9vFwQyGhm18t2SM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments