5 minute read

Dark Mode

How to view PDF in dark mode on macOS and iOS? What are the best tools for this? Currently I find https://github.com/vedang/pdf-tools on Emacs has decent output. Is there an app using the same mechanism underneath?

Viewing PDFs in dark mode varies significantly between a simple “Invert Colors” filter and the sophisticated color remapping found in tools like pdf-tools. The mechanism used by pdf-tools (specifically via the Poppler library) involves re-rendering the document by remapping the background and foreground color values, which preserves image quality better than a global system inversion.

The Mechanism Behind pdf-tools

The pdf-view-midnight-minor-mode in Emacs works by modifying the rendering parameters of the Poppler engine. Instead of simply flipping the pixels of a rendered image, it tells the engine to replace specific color hex codes (like ​#FFFFFF for background) with a dark alternative and lightens the text colors accordingly.

Best macOS Tools for Dark Mode

  • Sioyek This is perhaps the closest spiritual successor to the pdf-tools experience for a standalone application. It is a PDF viewer designed for technical documentation and research.

    • Mechanism: Like pdf-tools, it allows for custom color mapping. You can define specific background and foreground colors in your configuration file.
    • Usage: Press r to toggle “Smart Dark Mode,” which intelligently inverts text while attempting to keep images visible.
    • Verbatim: Configurable via prefs_user.config.
  • Okular A cross-platform viewer originally from the KDE project but available on macOS via Homebrew (brew install okular).

    • Mechanism: It also uses the Poppler backend. It provides a “Change Dark/Light Colors” feature under accessibility settings.
    • Capability: It allows you to choose a “Recolor” mode that mimics the midnight mode of Emacs almost perfectly, where you can pick the exact dark gray and light text colors you prefer.
  • PDF Expert The most polished GUI option for macOS.

    • Mechanism: It provides a “Themes” toggle (Day, Sepia, Night).
    • Quality: The “Night” mode is well-tuned for legibility, though it is less customizable than the open-source engines.

Best iOS Tools for Dark Mode

Native way: Using Smart Invert

In any PDF viewer that doesn’t support or turn on dark mode, you can turn on Settings > Accessibility > Display & Text Size > Smart Invert to view the PDF in dark mode.

Viewing PDFs on iOS with high-quality dark mode is more restrictive due to the reliance on Apple’s PDFKit, but a few apps implement their own rendering logic.

  • PDF Expert (iOS) Similar to its macOS counterpart, it offers a “Night” theme. It is widely considered the smoothest implementation on iPad and iPhone. It changes the page background to a deep dark gray and adjusts the text to a readable white/gray.
  • KyBook 3 While primarily an E-book reader, its PDF rendering engine is highly customizable.

    • Capability: It allows for custom “Themes” where you can specify the background color and text color independently. It handles heavy PDFs well and provides a very “paper-like” dark mode.
  • MarginNote 3 For academic work, MarginNote allows you to apply a dark theme to the entire workspace, including the PDF document. It uses a color overlay method that is effective for long reading sessions.

OCR

How to OCR a PDF with both English and Japanese texts on macOS efficiently and with high quality? The OCR in the PDF should be permanent and usable in other platforms. Does macOS natively support this? What are the best approaches?

To OCR a PDF with mixed English and Japanese text on macOS efficiently, you need a solution that “embeds” a searchable text layer (OCR layer) into the file. While macOS has incredible built-in text recognition, the way it handles PDFs is slightly different from what you might expect for cross-platform compatibility.

Does macOS Natively Support This?

The short answer: Partially.

macOS (including the latest macOS 17 “Tahoe”*) uses a feature called *Live Text. When you open a scanned PDF in Preview.app, macOS automatically detects text (including Japanese and English) and allows you to select, copy, or search it locally.

The catch: This text layer is often “virtual.” If you send that file to a Windows or Linux user, they may see it only as a flat image with no searchable text. macOS does not natively provide a “one-click” button in Preview to “Burn OCR into PDF” for permanent, cross-platform use.

Best Approaches for 2026

1. The “Power User” Efficient Method: ocrmypdf

As a software engineer, this is your best bet. It is an open-source command-line tool that uses the Tesseract OCR engine. It is exceptionally good at handling bilingual documents and optimizing file size.

  • Setup:

    1. Install via Homebrew: brew install ocrmypdf
    2. Install the language packs: brew install tesseract-lang
  • Execution: Run the following command in your terminal to process a mixed-language file:

    ocrmypdf -l eng+jpn input.pdf output.pdf
  • Why it’s great: It creates a PDF/A (archive standard) file with a permanent invisible text layer that works on every platform. The -l eng+jpn flag tells the engine to look for both character sets simultaneously, significantly increasing accuracy for technical documents.

2. The Best “Native-Feel” GUI: Textify or PDF Expert

If you prefer a graphical interface that leverages Apple’s latest Vision Framework (which is arguably more accurate for Japanese than Tesseract), these are the top choices:

  • Textify: A lightweight App Store utility specifically designed for macOS Tahoe. It can “import” a scanned PDF and “export” a searchable version. It is very fast and respects your privacy by processing everything on-device.
  • PDF Expert: The gold standard for PDF management on Mac. It has a dedicated “OCR” tab. You simply click OCR, select English and Japanese from the language settings, and it will generate the text layer permanently.

    However, in the version I’ve installed, to recognize both languages, you should choose only Japanese. Choosing both languages fails to recognize Japanese for some reason.

3. The “Standard” High-Quality Method: Adobe Acrobat Pro

If “high quality” is the absolute priority (e.g., complex layouts, tables, or vertical Japanese text), Adobe Acrobat remains the industry leader. * Workflow: Open the PDF → Scan & OCRRecognize Text. * Pro Tip: In the settings, ensure Output Style is set to Searchable Image to keep the original scan’s appearance while adding the text underneath.

4. Summary Comparison

Method Effort Quality (Mixed Text) Cost
Preview (Native) Zero High (but not permanent) Free
ocrmypdf (CLI) Medium Very High Free (Open Source)
Textify Low High (Uses Apple Vision) Paid (Low cost)
Adobe Acrobat Low Highest Subscription

Categories:

Updated:

Comments