https://github.com/rngil/dark-pdf
Simple CLI tool to convert pdfs to dark mode, with TOC preservation
https://github.com/rngil/dark-pdf
dark-mode dark-theme pdf pdf-converter pdfjs
Last synced: 6 days ago
JSON representation
Simple CLI tool to convert pdfs to dark mode, with TOC preservation
- Host: GitHub
- URL: https://github.com/rngil/dark-pdf
- Owner: rngil
- License: mit
- Created: 2026-04-15T18:18:19.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-03T06:18:00.000Z (about 2 months ago)
- Last Synced: 2026-05-03T08:25:33.426Z (about 2 months ago)
- Topics: dark-mode, dark-theme, pdf, pdf-converter, pdfjs
- Language: JavaScript
- Homepage:
- Size: 103 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# dark-pdf
[](https://github.com/rngil/dark-pdf/actions/workflows/test.yml)
Convert PDFs to dark mode, with table of contents preservation.
---
## Install
```sh
npm install -g dark-pdf
```
## Usage
```sh
darkpdf [options]
```
### Options
| Flag | Default | Description |
| ---------------------- | -------------------------- | ------------------------- |
| `-o, --output ` | `__dark.pdf` | Output file path |
| `-t, --theme ` | `claude` | Theme to apply |
| `-s, --scale ` | `3` | Render quality multiplier |
| `-h, --help` | N/A | Show help |
### Themes
| Name | Color |
| ---------- | ------------- |
| `classic` | Pure black |
| `claude` | Claude Warm |
| `chatgpt` | ChatGPT Cool |
| `sepia` | Sepia Dark |
| `midnight` | Midnight Blue |
| `forest` | Forest Green |
## Programmatic API
```js
import { convert, THEMES } from "dark-pdf";
const outPath = await convert("/path/to/input.pdf", {
theme: "claude",
output: "/path/to/output.pdf",
scale: 3,
onProgress: ({ page, total }) => console.log(`${page}/${total}`),
});
```
---
Logo from [icon-icons.com](https://icon-icons.com/fr/icone/fichier-pdf/245974).