The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →You can build a browser-only PDF size-reduction workflow by rendering each source page with PDF.js, encoding the rendered pages as images, and assembling those images into a new PDF with a separate PDF-writing library such as pdf-lib. OffscreenCanvas and Web Workers can help with rendering or image processing, but they do not make PDF.js a PDF compressor—and rasterizing a document does not guarantee a smaller file.
What this workflow does—and what it does not
PDF.js is a parsing and rendering component. It loads a PDF, exposes document and page objects, and can render pages to a canvas. It is not, in the documented workflow described here, the step that writes a compressed replacement PDF.
As an Amazon Associate I earn from qualifying purchases.
The output step is reconstruction: encode each rendered page as an image, create a new PDF, and place one image on each new page. pdf-lib documents creating PDF documents, embedding JPEG or PNG image bytes, adding pages, and saving in a browser context. The resulting pages are image-based representations of the originals, not the original PDF objects with their data selectively optimized.
Free tools Windows power users keep installed
One-click scans. No signup required.
This can reduce size for some scan-heavy or image-heavy files, depending on the source and chosen resolution and image encoding. It can also make a file larger. It generally sacrifices the source document’s text and vector structure, and may not preserve links, forms, or other interactive features in the same way. Treat it as a trade-off, not a universal “compress” button.
#1 Best Overall
- PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
- QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
- VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
- INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
- EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0
How the pieces fit together
| Component | Role in the workflow | Important limit |
|---|---|---|
| PDF.js | Loads the selected PDF, retrieves pages, and renders them using a viewport and canvas context. | It supplies parsing and rendering, not the reconstructed output PDF. |
| OffscreenCanvas | Can assist image conversion or rendering work where supported. | It is a canvas API, not a PDF-writing format or compression engine. |
| Web Worker | PDF.js distributions include a separate core worker; worker-thread rendering is an optional capability in the draft API documentation. | A worker’s presence does not prove all rendering occurs off the UI thread. Rendering can fall back to the main thread. |
| PDF output library | Embeds encoded page images into newly created PDF pages and saves the result. | Embedding raster images does not restore the source’s text, vectors, or interactive structure. |
Build the page-by-page pipeline
- Accept a local file. Let the user choose a PDF and read its bytes in the browser. Passing a locally selected file avoids the cross-origin fetch dependency that applies when loading a PDF from another website.
- Load and inspect with PDF.js. Use the installed PDF.js display library to load the bytes and retrieve the document. Its API is asynchronous; plan for loading and page operations to complete asynchronously rather than blocking the interface.
- Choose a rendering scale. For each page, create a viewport at the selected scale. Set the canvas dimensions from that viewport, accounting for the desired output scale, and render the page using the canvas context and viewport. Higher dimensions preserve more fine detail but require more memory and can produce larger encoded images.
- Encode the rendered page. Convert the canvas output to an image format and quality chosen by the implementation. JPEG is a practical option when lossy image encoding is acceptable; PNG is also supported by pdf-lib but has different size and fidelity trade-offs. Do not promise a particular quality level or byte reduction without testing the actual file and settings.
- Create and save a replacement PDF. Use a PDF-writing library to create a document, add a page for each rendered source page, embed that page’s image, and save the output in the browser. Preserve page proportions when sizing the image on the output page so the reconstructed page is not stretched.
Keep the PDF.js display library and its worker assets on the same version. PDF.js warns that mismatched versions are not guaranteed to work and can produce an API/worker version error. Bundle or serve the worker through the deployment setup for the pinned version; PDF.js documentation says its worker is not enabled for file:// URLs, so test through the local or production server path you intend to use.
Use OffscreenCanvas and workers without assuming they solve everything
OffscreenCanvas is best understood as an optional rendering or image-conversion aid. PDF.js documentation describes worker OffscreenCanvas support as primarily intended to improve image conversion and rendering performance, and documents a canvas-area threshold used to decide when an image is resized through OffscreenCanvas. That does not make OffscreenCanvas responsible for writing the output PDF.
Rank #2
- FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
- ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
- READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
- WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
- OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)
There are two separate questions when using workers: whether PDF.js’s core worker is configured, and whether page rendering itself runs in a worker thread. The draft API documentation describes optional rendering in a worker thread that requires GlobalWorkerOptions.rendererSrc. If that renderer worker is absent or fails, rendering falls back to the main thread; a custom ownerDocument also disables worker rendering. Because this API documentation is explicitly a draft and may change, confirm the configuration against the PDF.js version you pin.
- Check worker startup in the deployed build rather than inferring it from a successful local render.
- Keep a fallback path for main-thread rendering, and present progress or cancellation controls if large documents could keep the interface busy.
- Test the exact production asset paths and browser support for the versions you ship.
Control memory by rendering incrementally
Canvas memory can become substantial before image encoding or PDF assembly is considered. Mozilla PDF.js’s FAQ estimates that one letter-size page rendered at 816 × 1056 pixels, with 4 bytes per pixel at 96 DPI, occupies about 3,446,784 bytes—approximately 3.5 MB. The same FAQ estimates about 14 MB per page at device pixel ratio 2. These are illustrative canvas-memory estimates, not measurements of a compressor.
Rank #3
- STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
- CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
- HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
- FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
- BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer
At those settings, a 100-page document can require roughly 3.5 MB per page’s canvas memory at 96 DPI, or about 14 MB per page at device pixel ratio 2, before accounting for other work. Avoid keeping every full-size canvas alive at once: render, encode, add the image to the output document, then release or reuse canvas resources as appropriate. This is an engineering precaution, not a measured performance result for a particular implementation.
Offer settings that expose the real trade-off
Give users control over the factors that determine output quality and size instead of presenting an unexplained compression percentage. A useful interface can include:
Rank #4
- IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
- IRIScan Express mobile scanner is powered via an included micro USB 2. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan. USB cable provided. AC Adapter not provided and not needed.
- IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
- IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
- Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management
- Resolution or scale: lower settings reduce the pixels available for fine print and detail; higher settings use more memory and may create larger images.
- Image format and quality: explain that lossy encoding can reduce image detail, while other formats may produce larger output depending on page content.
- Output comparison: show the source and generated file sizes after processing, rather than predicting savings in advance.
- Feature warning: tell users before conversion that output pages are rasterized and may not retain selectable/searchable text, links, forms, vectors, or document structure as in the source.
There is no source-published universal compression ratio for this pipeline. Report measured results only for named test files and declared settings; do not generalize a result from one PDF to all documents.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Test the result before offering it as a replacement
Evaluate representative documents against the original using the same settings. A smaller file is not automatically a better result if text becomes hard to read or important document behavior disappears.
Best Value
- Scanner type: Document
- Connectivity technology: USB
- With Auto Scan Mode, the scanner automatically detects what you're scanning
- Digitize documents and images
- Compare output size with source size.
- Inspect small text, fine lines, diagrams, and photographs at normal viewing size and when zoomed.
- Check whether searchable text, links, forms, and vectors are still present if users need them.
- Record the chosen output resolution and image encoding quality alongside measured results.
- Observe processing time and peak memory on the page counts and devices you intend to support.
- Verify worker availability and fallback behavior in the deployed build, including the server setup used to serve the PDF.js assets.
Handle remote PDFs separately
If users provide a URL instead of selecting a local file, the browser’s normal cross-origin rules apply. The remote server must permit the browser request through suitable CORS behavior, or the application needs an appropriate proxy. A proxy changes the architecture and moves some handling outside the browser; it should not be described as a wholly browser-only file flow.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




