Skip to content
/ darkpdf Public

Inverts colors of provided PDF file by saving pages as images and combining inverted version of images as one PDF

License

Notifications You must be signed in to change notification settings

merkez/darkpdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dark PDF

Convert PDF to PDF by inverting colours

This is an automated tool which converts background of PDF to Dark and automatically releases it.

CI file runs when something is changed on files which ends with *.pdf under ./uploads.

To run the automated tool it is enough to add PDF files to ./uploads then CI file will automatically start.

How to run

$ git clone --depth 1 [email protected]:mrtrkmnhub/darkpdf.git
$ cd darkpdf

Once you have added your PDF files to uploads folder, it is time to commit and push them to master branch as shown below.

$ git add uploads/*
$ git commit -m "<commit-message>" 
$ git push origin master

Once you have pushed it, dark version of PDF will be available under releases

Example

Example output of the tool

How to run on local

  • Create virtual python environment
   python3 -m venv ./venv
  • Source venv
    source ./venv/bin/activate
  • Upgrade pip and Install requirements
   pip install --upgrade  pip
   pip install -r requirements.txt
  • Place PDF files to ./uploads folder and run script *(Converted PDF Files will be in root folder of the project )
    python run converter.py 

The script can be extended more such as integration of Telegram, Slack, Discord bots and more.