Free plan

Dark mode PDF

Re-colour a PDF so it is easier to read at night
POST
/v1/pdfs/dark-mode

About this tool

This tool changes the colours of a PDF for comfortable reading in the dark. You choose invert (white text on a black page), night (softer inverted colours with warm grey text) or sepia (a warm paper tint). You can set how strong the effect is and which pages to change. Text stays as text.
For example, you turn a long manual into white text on a dark page so you can read it in bed.

How to use it

  1. Choose this tool.
  2. Add your PDF with Upload or drag and drop.
  3. Choose invert, night or sepia.
  4. Optionally set the strength and the pages.
  5. Press Generate, then download the PDF.

What you get back

You get a new PDF in dark or warm colours, ready to download. Your original is not changed.
GOOD TO KNOW
Pictures are inverted with the page (photographs look like negatives). The effect is a blend layer, so it shows in viewers that support PDF transparency. Counts as one PDF operation.
TEST IT LIVE

Try Dark mode PDF in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/dark-mode
Tool ID
pdfs.dark-mode
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/dark-mode" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'pages=1-3' \
  -F 'mode=invert' \
  -F 'strength=100'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.darkMode({
    "file": 'document.pdf',
    "pages": "1-3",
    "mode": "invert",
    "strength": 100
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->darkMode([
    'file' => 'document.pdf',
    'pages' => '1-3',
    'mode' => 'invert',
    'strength' => 100,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Re-colour a PDF for reading at night: invert it (white on black), soften it (night) or give the paper a warm tint (sepia). Text stays text and vectors stay vectors.

Dark mode PDF accepts PDF. You can send several files in one request.

Dark mode PDF is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/pdfs/dark-mode with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.