Skip to main content

Converts PDF files to nighttime mode

Project description

PDF Dark Mode

About

Pypi page

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

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

This program works best with non-handwritten PDF's and PDF's without any images.

Installation

Windows

  • 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 distributions of linux 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", ...])

If you dont feel like importing the package (or just didn't install it with pip), you can 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 Distribution

PdfDarkMode-1.0.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

PdfDarkMode-1.0.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file PdfDarkMode-1.0.2.tar.gz.

File metadata

  • Download URL: PdfDarkMode-1.0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for PdfDarkMode-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8db80775bb0ec74716a63b5237261e4591e5aa4fd703ea25546f9e7e2346d3e7
MD5 233bc31b9aaeafcc79fe9da5243c2346
BLAKE2b-256 e8fd7d80891fcffc4fdd8f04bae4a214ea0b2bc4ba1296d3eb13b9866d310b94

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: PdfDarkMode-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for PdfDarkMode-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b76fb8014af5d507e55d7033ee970bbb9bc06ff219c612cac8672befa1f7b148
MD5 c61ae8eb32168a7246cc8d2702e5353b
BLAKE2b-256 20180a7597776d9fcdd682857c5ab9afd5d5a49feacecef7738e9b1fefc21572

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