Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.88 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.88 KB

PDF Dark Mode

About

NOTE: This project is going under significant changes! Stay tuned for updates!

Python program that converts the white-space in PDF files to have a grey background.

Works best with non-handwritten PDF's and PDF's without any images.

Tested and working on Python 3.6+.

Installation

Windows

  • Requires poppler-windows >= v20.12.1. It should work with older versions too but I haven't gone through and tested each one.

  • Extract the folder somewhere on your PC.

  • Add the path C:<path-to-extracted-folder>\poppler-20.12.1\Library\bin in the Windows Environment PATH.

macOS

  • Mac users will have to install poppler for Mac. You can do so with this homebrew formula.

Linux

  • Most linux distros already have pdftoppm installed. If not, you can check your package manager on how to install poppler-utils.

Then

Using pip

  • pip install PdfDarkMode

Or

  • git clone https://github.com/JustinTheWhale/PDF-Dark-Mode.git

  • cd PDF-Dark-Mode

  • pip install -r requirements.txt

Usage

from PdfDarkMode.darkmode import convert

convert("example.pdf")

Additionally, you can pass a list of PDF files instead of just one string like so:

from PdfDarkMode.darkmode import convert

convert(["example.pdf", "example2.pdf", ...])

You can also run it directly from the command line:

python darkmode.py example.pdf example2.pdf ...

Example