100KB Extension v1.1.1: Compress & resize files in 0ms directly in Google Chrome

Add to Chrome
KB
100kb
Organize PDF
Merge PDF
Split PDF
Unlock PDF
Optimize PDF
Compress PDFFAST
Convert PDF
JPG to PDF
PDF to Word
Crop & Scale
Passport Photo MakerICAO
Compress Image
Compress Signature
HEIC to JPG
Increase Image Size
Resize & Crop Image
PNG to JPG
JPG to PNG
Backdrop & Stamps
Remove BackgroundAI
Stamp & Date Cleaner
Combine Images
Photo & Signature Joiner
Visa & Passport SpecsSPECS
🇺🇸US Visa & Passport🇮🇳India Exams (UPSC, NEET)🌐Schengen, UK & Canada
Browse All Guidelines
🌐 Browse All Countries🇮🇳India (Exams)🇺🇸United States🇬🇧United Kingdom🇨🇦Canada🇦🇺Australia🇮🇪Ireland🇳🇿New Zealand
Guides
Developer Platform & SDK
Developer OverviewWASM Architecture & Self-Serve Licensing
Developer SDK Technical SpecsWASM Methods & Parameters
Commercial Licensing & PricingSelf-Serve B2B Licensing
WordPress & WooCommerceAuto Media Library WASM Hook
Shopify App & StorefrontZero-Upload Image Optimization
Integrations & PluginsPre-built Framework Components
KB
100kb

Fast, secure resizers. Statically compiled and running purely in JavaScript to keep Aadhaar, marksheets, and applicant credentials confidential.

Support & Contact:

Email: info@100kb.in

Developer SDK & API Overview
  • • Developer SDK Technical Specs
  • • Commercial Licensing & Pricing
  • • WordPress Plugin & Widget
  • • Shopify Liquid Custom Uploads
  • • Multi-Framework SDK Hub

Image Tools

  • Compress Image
  • Passport Photo Maker
  • Compress Signature
  • Photo & Signature Joiner
  • Remove Background
  • HEIC to JPG
  • JPG to PNG
  • PNG to JPG
  • Stamp & Date Cleaner
  • Increase Image Size
  • Resize & Crop Image

PDF Tools

  • Compress PDF
  • JPG to PDF
  • Merge PDF
  • PDF to Word
  • Split PDF
  • PDF to JPG
  • Unlock PDF

Guides

  • → All Technical Guides Hub
  • Signature & 20KB Guide
  • Real Estate Photo Guide
  • Document Guidelines Hub

Visa & Passport Specs

→ Exam Guidelines Hub

✓ UPSC Exam Rules (50KB caps)

✓ SSC Exam Rules (20KB caps)

✓ Banking IBPS / SBI Caps

✓ NSDL PAN Portal Sizes

US (USCIS, DS-260) UK (UKVI, Passport) Canada (IRCC, PR)

Disclaimer: 100kb.in is a private, independent utility website and is not affiliated with, authorized, or endorsed by any government entity or official exam conducting authority, including UPSC, SSC, IBPS, SBI, or NSDL. All product names, logos, and brands are property of their respective owners, and are used for identification and reference purposes only.

EnglishEspañolPortuguêsFrançaisDeutsch日本語Русский中文한국어ItalianoSvenskaNorskRomânăBahasa Indonesia

© 2026 100kb.in. All rights reserved.

About UsPrivacy PolicyTerms of ServiceContact SupportGuidesSuggest a ToolAll Tools
Back to Guides

How Document Scanners Work: DPI, Optical Sensors & PDF Stream Deflation

Published August 14, 2026·9 min read

Client-Side PDF Compressor

Compress scanned documents and government PDFs under 100KB locally.

Use Tool — Free

When candidates apply for competitive examinations, visa renewals, or government job portals, they are almost universally met with strict document upload criteria: upload your scanned academic marksheet, birth certificate, or degree diploma as a PDF file under 100KB or 200KB. Applicants routinely confront a frustrating technical paradox: scanning at default high resolution creates massive 5MB to 15MB files that trigger immediate portal upload rejection errors, whereas scanning at low scanner settings results in pixelated, illegible text that gets discarded by human verification officers. In this engineering masterclass, we explore the optical physics of document scanning, spatial sampling mechanics, the internal object hierarchy of the PDF specification, and the algorithmic mechanisms of WebAssembly stream deflation.

1. Optical Scanning Physics: CCD vs. CIS Sensor Arrays

Document scanners convert physical paper documents into digital pixel matrices by measuring light reflectance across the page surface using one of two primary sensor architectures.

Charge-Coupled Device (CCD) Optical Systems

High-end flatbed scanners utilize Charge-Coupled Device (CCD) optical assemblies. A cold-cathode fluorescent lamp (CCFL) or high-CRI LED illuminates the document. Light reflects off the ink and paper, traveling through an optical path of mirrors and lenses that focus the image onto a miniaturized linear CCD sensor array. Because CCD systems incorporate true optical focal depth, they excel at capturing uneven documents, bound books, and embossed seals without geometric distortion. However, the analog-to-digital conversion stage generates uncompressed 24-bit raw RGB bitmaps that require immense computational memory.

Contact Image Sensors (CIS)

Most modern all-in-one printer-scanners and mobile document feeding trays utilize Contact Image Sensors (CIS). In a CIS sensor, a linear bar of red, green, and blue LEDs illuminates the paper directly beneath a row of rod lenses positioned micrometers away from the paper surface. While CIS modules are compact, lightweight, and energy-efficient, they possess nearly zero optical depth of field: any paper wrinkle, staple fold, or page curvature causes immediate loss of focus, producing fuzzy scans that require post-scan digital sharpening.

2. Spatial Sampling Mathematics: Decoding DPI, PPI, and Raw Bitmap Memory

Understanding why scanned PDFs balloon into multi-megabyte files requires examining the mathematics of spatial sampling and pixel density.

DPI (Dots Per Inch) describes the physical sampling frequency of the scanner carriage. When an A4 page (measuring 8.27 x 11.69 inches) is scanned at 300 DPI, the sensor captures 300 discrete optical samples along every linear inch in both the X and Y axes.

The Raw Uncompressed Bitmap Formula

Width in pixels = 8.27 inches × 300 DPI = 2,481 pixels. Height in pixels = 11.69 inches × 300 DPI = 3,507 pixels. Total pixel count = 2,481 × 3,507 = 8,700,867 pixels (8.7 Megapixels). At 24-bit color depth (3 bytes per pixel: 8 bits for Red, 8 bits for Green, 8 bits for Blue), an uncompressed single-page scan occupies: 8,700,867 × 3 bytes = 26,102,601 bytes (~26.1 Megabytes) of uncompressed raw bitmap memory!

Why Default Scanner Software Generates Bloated PDFs

Most bundled desktop scanner software packages (from HP, Canon, or Epson) package this 26MB bitmap into a PDF envelope by wrapping it in an unoptimized, low-efficiency JPEG stream with baseline chroma subsampling (4:4:4) and high-quality quantization tables. Furthermore, scanner drivers routinely inject thousands of lines of uncompressed TIFF metadata, scanner calibration curves, ICC color profile blobs, and embedded thumbnail previews, inflating a simple single-page black-and-white certificate to 4MB or 8MB.

3. Spatial Resolution Comparison: DPI vs. File Size & Legibility

The table below illustrates how scanning resolution directly influences pixel dimensions, raw byte footprints, and portal compatibility for standard A4 documents.

Scan ResolutionPixel Dimensions (A4)Raw Memory SizeDefault Scanner PDFOptimal Deflated PDF
600 DPI (Archival)4,960 × 7,016 px104.4 MB12 MB – 25 MB1.5 MB – 2.8 MB
300 DPI (Standard Print)2,480 × 3,508 px26.1 MB3.5 MB – 7.2 MB180 KB – 380 KB
200 DPI (Exam Optimal)1,654 × 2,338 px11.6 MB1.8 MB – 3.2 MB85 KB – 140 KB
150 DPI (Web Maximum)1,240 × 1,754 px6.5 MB900 KB – 1.6 MB45 KB – 85 KB
72 DPI (Screen Display)595 × 842 px1.5 MB350 KB – 650 KB18 KB – 35 KB

4. Deep Inside the %PDF-1.7 File Architecture

A Portable Document Format file is not a flat bitmap container; it is a structured, object-oriented binary database governed by ISO 32000 specifications.

The Four Fundamental Layers of a PDF Document

Every valid PDF is organized into four distinct hierarchical architectural sections: (1) Header: Declares file format version (%PDF-1.7); (2) Body Stream: A collection of indirect objects including font subsets, content dictionaries, transformation matrices, and image XObjects; (3) Cross-Reference Table (xref): A byte-offset index enabling random access to every object without sequential parsing; and (4) Trailer: Root catalog pointers and encryption dictionaries.

Image XObjects and Stream Dictionaries

When a scanner embeds a physical scan, it creates an indirect object categorized as /Type /XObject /Subtype /Image. Associated metadata dictionary keys define the color space (/DeviceRGB or /DeviceGray), bits per component (/BitsPerComponent 8), and the compression filter (/Filter /DCTDecode or /FlateDecode). The raw image payload sits inside the stream...endstream binary envelope.

5. How WebAssembly Deflates Scanned PDFs Under 100KB

Generic cloud compression sites rely on destructive global rasterization: they render every page of the PDF into a lossy JPEG and re-wrap it. This turns sharp text into fuzzy artifacts. In contrast, 100kb.in executes a multi-stage WebAssembly stream deflation pipeline.

  • Indirect Object Parsing: The WASM module disassembles the PDF cross-reference table and isolates image XObjects without altering vector text, form fields, or digital signatures.
  • Adaptive Chroma Subsampling (4:2:0): Scanned documents consist primarily of high-contrast text edges. The human eye has low sensitivity to color chrominance detail. The engine subsamples Cb and Cr color channels to half resolution while preserving 100% luminance (Y) sharpness.
  • Selective Bi-Cubic Resampling: Large 300+ DPI image streams are downsampled to 180–200 DPI—the mathematical sweet spot where micro-text remain crystal clear while discarding 60% of unnecessary pixel payload.
  • FlateDecode LZ77 Compression: Text layout operators and metadata dictionaries are compressed using optimized Deflate algorithms compiled from native C libraries.
  • Metadata and ICC Profile Stripping: Redundant scanner profile blobs, camera tags, and embedded XML catalogs are safely excised from the document tree.

Client-Side PDF Compressor

Compress scanned documents and government PDFs under 100KB locally.

Use Tool — Free
Advertisement

Frequently Asked Questions

What scanner DPI setting is best for government and job portal uploads?

For official government portals (such as UPSC, SSC, USCIS, or UKVI), the ideal scanning setting is 200 DPI in Grayscale or Color. 200 DPI delivers approximately 1654x2338 pixels for an A4 sheet, which provides flawless legibility for signatures, official stamps, and fine text while producing an easily compressible byte footprint under 100KB.

Why does scanning in Grayscale reduce file size so dramatically?

Color scans capture three channels per pixel (Red, Green, Blue) requiring 24 bits per pixel. Grayscale captures only luminance (shades of gray from 0 to 255) using a single 8-bit channel per pixel. Grayscale immediately reduces the raw uncompressed data payload by 66.7% before any compression algorithms are applied.

Will compressing my scanned marksheet or certificate make it illegible?

No. 100kb.in uses intelligent bicubic downsampling and luminance preservation. Crucial structural details—such as numerical grades, university stamps, and signatures—retain high edge contrast and remain completely readable by examination verification officers.

Why do scanner apps like CamScanner produce files over 2MB?

Mobile scanner apps apply heavy post-processing filters, uncompressed color saturation matrices, and high-resolution JPEG encoding with 95%+ quality ceilings. They also embed extensive EXIF telemetry and app branding, which balloons the PDF file size.

Can I compress a multi-page scanned PDF under 200KB?

Yes. Our WebAssembly engine optimizes each page stream independently. By converting multi-page scans to optimized 150-200 DPI Grayscale and applying FlateDecode compression, multi-page academic transcripts easily fit within strict 200KB or 300KB upload limits.

Related Guides

PDF Optimization Guide: Shrinking PDFs Without Blur

Aug 14, 2026

How to Compress a PDF to Under 100 KB (Without Losing Quality)

Jul 11, 2026

USCIS Document Upload Size Limits — Complete Guide (2026)

Jul 11, 2026

Client-Side WebAssembly vs. Cloud File Uploads: The Ultimate Privacy Guide

Aug 14, 2026