Veil – Dark mode PDFs without destroying images, runs in the browser

Hi HN! here's a tool I just deployed that renders PDFs in dark mode without destroying the images. Internal and external links stay intact, and I decided to implement export since I'm not a fan of platform lock-in: you can view your dark PDF in your preferred reader, on any device. It's a side project born from a personal need first and foremost. When I was reading in the factory the books that eventually helped me get out of it, I had the problem that many study materials and books contained images and charts that forced me, with the dark readers available at the time, to always keep the original file in multitasking since the images became, to put it mildly, strange. I hope it can help some of you who have this same need. I think it could be very useful for researchers, but only future adoption will tell.With that premise, I'd like to share the choices that made all of this possible. To do so, I'll walk through the three layers that veil creates from the original PDF:- Layer 1: CSS filter. I use invert(0.86) hue rotate(180deg) on the main canvas. I use 0.86 instead of 1.0 because I found that full inversion produces a pure black and pure white that are too aggressive for prolonged reading. 0.86 yields a soft dark grey (around #242424, though it depends on the document's white) and a muted white (around #DBDBDB) for the text, which I found to be the most comfortable value for hours of reading.- Layer 2: image protection. A second canvas is positioned on top of the first, this time with no filters. Through PDF.js's public API getOperatorList(), I walk the PDF's operator list and reconstruct the CTM stack, that is the save, restore and transform operations the PDF uses to position every object on the page. When I encounter a paintImageXObject (opcode 85 in PDF.js v5), the current transformation matrix gives me the exact bounds of the image. At that point I copy those pixels from a clean render onto the overlay. I didn't f

Hacker NewsToolAISource
0Sign in to voteCopy link

FL score

78

out of 100

Verdict

BUILD

high confidence

Competition

8

competitors found, emerging market, funded players

Trend

No signal yet

A browser-based tool for dark mode PDFs that preserves images, targeting frustrated readers and researchers.

The pain

Users of dark mode PDF readers (especially browser extensions) experience significant frustration when images, charts, and diagrams are distorted or rendered unusable due to color inversion, forcing them to juggle between the dark mode and original files.

The gap

While many dark mode PDF solutions exist, few reliably handle image preservation, leading to a specific unserved niche for users who require accurate visual information in their dark mode reading experience. Existing solutions are either generic color inverters or expensive full-suite PDF editors that may not specifically address this technical challenge elegantly.

Build angle

Focus on a seamless, high-quality rendering experience for image-rich PDFs in dark mode, ensuring visual fidelity. Potentially integrate with popular research or document management workflows (e.g., Notion, Zotero) where PDF reading is critical.

Strengths

  • Addresses a specific, frequently articulated pain point (distorted images in dark mode PDFs).
  • Clear value proposition: dark mode without compromising visual data.
  • Founder has deep technical expertise and personal experience with the problem.
  • Solution is already built and deployed, providing immediate validation opportunities.

Risks

  • The broader dark mode and PDF reader market is crowded with free options and large incumbents (Adobe).
  • High technical complexity for a solo builder to maintain and scale, especially cross-browser/device.
  • Monetization strategy is unclear; users are accustomed to free dark mode features.
  • Distribution challenging against entrenched browser extensions and built-in PDF viewers.
  • The 'AI' tag might be misleading if the core value isn't AI-driven, potentially diluting messaging.

Next steps

  1. Conduct user interviews with identified target audience (researchers, students) to validate willingness to pay for this specific solution.
  2. Explore potential integrations or partnerships with academic platforms or research tools where this problem is most acute.
  3. A/B test different pricing models, potentially starting with a one-time purchase for the export feature or a small subscription for premium features.
  4. Gather extensive user feedback on the current tool's performance and identify the most requested advanced features.
  5. Clarify the 'AI' tag; if no AI is involved in the core image preservation, remove it to avoid confusion.

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Veil – Dark mode PDFs without destroying images, runs in the browser”.

Open FlyBot