<?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: Vishnu-cod</title>
    <description>The latest articles on DEV Community by Vishnu-cod (@vishnucod).</description>
    <link>https://dev.to/vishnucod</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4254487%2Fb5da18a4-8f10-4c1c-b114-81fb74a5ed1c.png</url>
      <title>DEV Community: Vishnu-cod</title>
      <link>https://dev.to/vishnucod</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishnucod"/>
    <language>en</language>
    <item>
      <title>How I Built a 100% Client-Side PDF Powerhouse with WebAssembly and React (Zero Cloud Uploads)</title>
      <dc:creator>Vishnu-cod</dc:creator>
      <pubDate>Thu, 19 Nov 2026 20:58:14 +0000</pubDate>
      <link>https://dev.to/vishnucod/how-i-built-a-100-client-side-pdf-powerhouse-with-webassembly-and-react-zero-cloud-uploads-1mn6</link>
      <guid>https://dev.to/vishnucod/how-i-built-a-100-client-side-pdf-powerhouse-with-webassembly-and-react-zero-cloud-uploads-1mn6</guid>
      <description>&lt;p&gt;Why Does Every Online PDF Tool Want Your Credit Card and Your Tax Returns?&lt;/p&gt;

&lt;p&gt;Earlier this month, I had to upload a signed certificate to a government application portal. The portal had one strict requirement:&lt;/p&gt;

&lt;p&gt;"Uploaded PDF must be strictly below 100 KB."&lt;/p&gt;

&lt;p&gt;I did what everyone does: searched "compress PDF under 100kb" on Google.&lt;/p&gt;

&lt;p&gt;Every single top result was a multi-million-dollar SaaS product that:&lt;/p&gt;

&lt;p&gt;Forced me to upload a sensitive personal document to an undisclosed remote server.&lt;br&gt;
Compressed it to 125 KB (still rejected by the portal!).&lt;br&gt;
Locked the "Extreme Compression" slider behind a $12/month subscription.&lt;br&gt;
Or hit me with: "You have reached your free daily quota of 2 files. Enter your credit card."&lt;/p&gt;

&lt;p&gt;I got frustrated enough that I decided to see how far we could push modern web browser primitives—WebAssembly, HTML5 Canvas, Web Workers, and pdf-lib—to build a completely private, zero-server alternative.&lt;/p&gt;

&lt;p&gt;That experiment became PDFCraft&lt;br&gt;
 (Source on GitHub&lt;br&gt;
).&lt;/p&gt;

&lt;p&gt;Here is the technical breakdown of how we achieved 100% client-side PDF manipulation with zero cloud leaks.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Core Architecture: Zero-Cloud Processing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Traditional PDF websites use server-side Python/C++ pipelines (e.g., Poppler, Ghostscript, or LibreOffice in Docker containers). That architecture has major drawbacks:&lt;/p&gt;

&lt;p&gt;Massive Server Costs: Running headless PDF engines across millions of files costs thousands in server bills.&lt;br&gt;
Privacy Risks: Uploading legal contracts, tax documents, and medical scans creates massive GDPR and compliance liabilities.&lt;/p&gt;

&lt;p&gt;Instead, PDFCraft operates entirely on the client device:&lt;/p&gt;

&lt;p&gt;User Device (Local Memory)&lt;br&gt;
├── File Input (Drag &amp;amp; Drop)&lt;br&gt;
│    └── ArrayBuffer / Blob in Local Memory&lt;br&gt;
├── Local Processing Engines&lt;br&gt;
│    ├── pdf-lib (Vector streams, page tree manipulation, e-signatures)&lt;br&gt;
│    ├── HTML5 Canvas (Quantization, resolution scaling, image crunching)&lt;br&gt;
│    └── Web Workers (Off-main-thread compute without freezing the UI)&lt;br&gt;
└── Instant Download&lt;br&gt;
     └── Direct Blob URL (0 bytes transmitted to any backend)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Target Size Squeezer: Hitting Exact 100KB/200KB Ceilings&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Standard compressors just say "Low, Medium, High". But portal upload bots don't care about "High"—they care about ≤ 95 KB or ≤ 195 KB.&lt;/p&gt;

&lt;p&gt;To guarantee that a PDF always comes in under the portal limit:&lt;/p&gt;

&lt;p&gt;Binary Stream Extraction: We extract embedded page streams and rasterize page canvases at high DPI.&lt;br&gt;
Dynamic Binary Search Quantization: Instead of guessing a single JPEG quality factor, our algorithm runs an in-memory binary search across resolution scale and quantization factors:&lt;br&gt;
It tests quality brackets (e.g. 0.85 -&amp;gt; 0.65 -&amp;gt; 0.45) in milliseconds.&lt;br&gt;
If the generated PDF stream exceeds the target ceiling (say, 95 KB), it immediately downscales background image coordinates while preserving vector text edge sharpness.&lt;br&gt;
Iterative Verification: The final byte buffer is measured before download. If it's 94.2 KB, it is delivered immediately.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Zero-Account E-Signing (ESIGN Compliant)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Instead of forcing users to sign up for DocuSign or Adobe Sign just to put an initials stamp on a 2-page lease, we implemented an in-browser vector signature pad:&lt;/p&gt;

&lt;p&gt;Signatures are captured via HTML5 Canvas with cubic Bézier curve smoothing for natural pen strokes.&lt;br&gt;
The vector paths are converted directly into clean PNG byte streams and embedded into the PDF page tree using pdf-lib's drawImage and drawText.&lt;br&gt;
The entire signing session happens offline—even with airplane mode turned on!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;60-Second ATS Resume Studio&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most online resume builders let you design your resume for 30 minutes, only to hit you with a paywall modal at the download step.&lt;/p&gt;

&lt;p&gt;PDFCraft includes a built-in ATS Resume Studio that:&lt;/p&gt;

&lt;p&gt;Formats single-page vector PDF resumes compatible with applicant tracking systems (Workday, Greenhouse, Lever).&lt;br&gt;
Includes a local keyword scanner that compares your resume against any job description in real-time.&lt;br&gt;
Exports directly as clean, uncompressed vector text that machine parsers can read with 100% accuracy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What We Learned&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Modern browser engines (V8, WebAssembly, Web Workers) are powerful enough to replace 90% of cloud utilities. You don't need a heavy backend server to compress a PDF, sign an agreement, or extract spreadsheet tables.&lt;/p&gt;

&lt;p&gt;🌐 Live Web App: &lt;a href="https://pdf-craft-vert.vercel.app/" rel="noopener noreferrer"&gt;https://pdf-craft-vert.vercel.app/&lt;/a&gt;&lt;br&gt;
📦 Open Source Repository: &lt;a href="https://github.com/Vishnu-cod/pdf-craft" rel="noopener noreferrer"&gt;https://github.com/Vishnu-cod/pdf-craft&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear feedback from the developer community! What utilities would you like to see built into the client-side suite next?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
