Skip to main content

Converts PDF's to have a grey background to be easier on the eyes

Project description

PDF Dark Mode

About

Pypi page

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.

  • Download poppler for Windows from here.

  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

PdfDarkMode-1.0.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file PdfDarkMode-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: PdfDarkMode-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for PdfDarkMode-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6b087c1c6b4aa02867e9c0924c00e0d2d1a5905afe6f8931d79921f60c669df1
MD5 66522d2c3582c8ee567397e10e12474c
BLAKE2b-256 5e26a8e9e1ba68b1295405cb0beb7f704b04b98180cc2381bb699ef8aa083515

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page