Article 51Z8E removing a watermark from a pdf

removing a watermark from a pdf

by
Pedroski
from LinuxQuestions.org on (#51Z8E)
I can watermark pdfs quite well.

Today I am wondering how to unwatermark them. The gf has some old exams, they have a telephone number as watermark in very big numbers.

I opened a page of a watermarked pdf in gimp.

Using select by colour, I selected the watermark because it is grey.

With the settings Radius = 8, Threshold = 12 I quickly selected all the watermark.

Then floodfill whole selection with white and voila! Done! But to do this with 20 exams, each 8 pages, well, I don't want to!

The text is all black and unaffected. Now I want to automate this with Python.

I watermark the pdfs with reportlab and PyPDF2

I think it should be possible to run through each page, find the grey pixels and make them white.

Any tips on the best way to do this?latest?d=yIl2AUoC8zA latest?i=-41BZlONYjY:OFCI8NknhAc:F7zBnMy latest?i=-41BZlONYjY:OFCI8NknhAc:V_sGLiP latest?d=qj6IDK7rITs latest?i=-41BZlONYjY:OFCI8NknhAc:gIN9vFw-41BZlONYjY
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