<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 1436941541</title>
    <description>The latest articles on DEV Community by 1436941541 (@1436941541).</description>
    <link>https://dev.to/1436941541</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3897268%2F78bfa71e-c5d8-4d42-864e-86a53e9375e4.png</url>
      <title>DEV Community: 1436941541</title>
      <link>https://dev.to/1436941541</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/1436941541"/>
    <language>en</language>
    <item>
      <title>I built a privacy-first PDF dark mode converter that runs entirely in your browser</title>
      <dc:creator>1436941541</dc:creator>
      <pubDate>Sat, 25 Apr 2026 08:58:01 +0000</pubDate>
      <link>https://dev.to/1436941541/i-built-a-privacy-first-pdf-dark-mode-converter-that-runs-entirely-in-your-browser-3ebl</link>
      <guid>https://dev.to/1436941541/i-built-a-privacy-first-pdf-dark-mode-converter-that-runs-entirely-in-your-browser-3ebl</guid>
      <description>&lt;p&gt;TL;DR: I shipped &lt;a href="https://pdfdark.org" rel="noopener noreferrer"&gt;pdfdark.org&lt;/a&gt; — a browser-side PDF dark mode converter. Files don't get&lt;/p&gt;

&lt;p&gt;uploaded; the entire conversion happens in your browser via PDF.js + a Web Worker. Open source (MIT), free, no signup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built this
&lt;/h2&gt;

&lt;p&gt;Reading long PDFs at night was killing my eyes. The two paths I had both sucked:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Existing "dark mode PDF" web tools → required uploading the file. For research papers, contracts, medical records&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;— that felt sketchy. No way to verify what they did with my data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;OS-level "invert colors" → wrecked photos and charts. Faces became X-rays. Graphs became noise.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I built one with two non-negotiable defaults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nothing leaves your browser. PDF.js parses the file, a Web Worker does the dark-mode pass, pdf-lib stitches the&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;result. Verify it yourself in DevTools → Network.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Images keep their original colors. A saturation classifier detects photos and figures and leaves them untouched&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;while it darkens text and UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Drop PDF&lt;/p&gt;

&lt;p&gt;→ PDF.js renders pages to canvas&lt;/p&gt;

&lt;p&gt;→ Web Worker classifies each pixel by saturation&lt;/p&gt;

&lt;p&gt;├─ saturated pixels (images, charts) → preserved&lt;/p&gt;

&lt;p&gt;└─ low-saturation pixels (text, UI) → themed&lt;/p&gt;

&lt;p&gt;→ pdf-lib assembles a new PDF&lt;/p&gt;

&lt;p&gt;→ User downloads&lt;/p&gt;

&lt;p&gt;The classifier runs on OffscreenCanvas inside a Web Worker, so the UI thread never blocks on large PDFs.&lt;/p&gt;

&lt;p&gt;Output is a real PDF (image-based, one JPEG per page), so the dark mode persists when you email it, sync it to iPad, or&lt;/p&gt;

&lt;p&gt;open it on a Kindle. Not a viewer toggle.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it cost to ship
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Domain: $7.50 (Cloudflare Registrar, .org)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hosting: $0 (Vercel free tier)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Email forwarding: $0 (Cloudflare Email Routing)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Error monitoring: $0 (Sentry free tier, errors only with full content masking)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Time: a few weekends&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total cost: $7.50.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm watching
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Whether the "no-upload" angle resonates beyond privacy nerds&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edge cases that break the algorithm (weird embedded fonts, scanned PDFs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Whether to add a vector-preserving mode for text-only PDFs (current output is image-based, so text isn't selectable)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Live: &lt;a href="https://pdfdark.org" rel="noopener noreferrer"&gt;pdfdark.org&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/1436941541/pdf-dark" rel="noopener noreferrer"&gt;github.com/1436941541/pdf-dark&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Privacy: &lt;a href="https://pdfdark.org/privacy" rel="noopener noreferrer"&gt;pdfdark.org/privacy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>showdev</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
