Metadata-Version: 2.1
Name: PdfDarkMode
Version: 1.0.3
Summary: Converts PDF's to have a grey background to be easier on the eyes
Home-page: https://github.com/JustinTheWhale/PDF-Dark-Mode
Author: JustinTheWhale
Author-email: Justin Martinez <justinraymen@gmail.com>
License: MIT License        
        Copyright (c) Justin Martinez        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project-URL: Homepage, https://github.com/JustinTheWhale/PDF-Dark-Mode
Project-URL: Bug Tracker, https://github.com/JustinTheWhale/PDF-Dark-Mode/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: fpdf
Requires-Dist: numba
Requires-Dist: pdf2image
Requires-Dist: Pillow
Requires-Dist: PyPDF2

# PDF Dark Mode

## About 

### [Pypi page](https://pypi.org/project/PdfDarkMode/)

### _*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](https://https://github.com/oschwartz10612/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.](https://https://github.com/oschwartz10612/poppler-windows/releases/tag/v22.04.0-0)
- #### 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.](https://formulae.brew.sh/formula/poppler)

### 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
```python
from PdfDarkMode.darkmode import convert

convert("example.pdf")
```

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

```python

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
<img src="examples/example_input.png">
<img src="examples/example_output.png">
