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?


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?