Skip to content

A simple program to remove the watermark from a PDF file.

Notifications You must be signed in to change notification settings

eoeair/Python-Remove-Watermark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Python-Remove-Watermark

A simple program to remove the watermark from a PDF/JPG/PNG file.

How?

  1. convert the PDF file into images using pymupdf
  2. convert the images(include .jpg/.png) to numpy array
  3. find the specific pixel by watermarks' rgb values and change them into (255,255,255)
  4. save the modified images

How to use?

First you need to install the dependencies:

$ pip install pillow pymupdf scikit-image numba

For .pdf execute:

$ python watermark.py --source source.pdf --target out

For .jpg/.png execute:

$ python watermark.py --source source.png --target out

Don't forget to indicate the source path you want to convert, script will automatically creates an output path.

Results

image

About

A simple program to remove the watermark from a PDF file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%