Skip to content

Transparency

Sources and tests

Every size shown on this site comes from running the actual code on sample files we generated. No portal size rule is quoted, because none could be verified from an official source we may use. This page lists the libraries, the method and every result.

Libraries and licences

  • pdf-lib 1.17.1, MIT licence: reads and writes the PDF structure.
  • pdf.js 3.11.174, Apache-2.0 licence (Mozilla): renders pages for Smallest mode and previews.
  • Space Grotesk, SIL OFL 1.1; Noto Nastaliq Urdu and Liberation Sans (Urdu Latin companion), SIL OFL 1.1. Licence files ship with the fonts.

How the sample files were made

A script (tests/make-samples.mjs in the repository) draws pages in a canvas: paper tone, a lighting gradient, lines of text, a stamp and random sensor noise, then saves them as JPEG (quality 90, 1654 x 2339 px, 200 DPI A4) and wraps them in PDFs with pdf-lib. The 30-page text document is made with standard Helvetica text. The mixed file is a typed cover page plus two scans. These are synthetic: noisy pages are a hard case, so real clean scans usually compress more.

All results

These are real runs of the code on this site, in desktop Chrome, on sample files we generated ourselves: a "phone scan" is a page drawn at 200 DPI with paper tone, uneven light, text lines and sensor noise, saved as a JPEG at quality 90 inside a PDF. Real scans vary: smoother pages compress better, noisier or very detailed pages worse. Treat the table as an example, not a promise. "Picture sharpness" is the approximate resolution of the pictures after compression (the samples start at 200 DPI); about 150 is crisp, about 100 is readable for normal print, below about 80 small text gets hard to read. The method is in Sources and tests.

Test fileOriginalLimit askedMethodResultPicture sharpnessUnder the limit?Time
6-page phone scan9.49 MB500 KBKeep text493 KB~80 DPIYes1.4 s
6-page phone scan9.49 MB200 KBKeep text146 KB~50 DPIYes1.3 s
6-page phone scan9.49 MB100 KBKeep text90 KB~40 DPIYes1.3 s
6-page phone scan9.49 MB1.00 MBKeep text856 KB~100 DPIYes1.9 s
6-page phone scan9.49 MB500 KBSmallest383 KB~72 DPIYes10.4 s
6-page phone scan9.49 MB200 KBSmallest152 KB~50 DPIYes10.9 s
6-page phone scan9.49 MB100 KBSmallest109 KB~42 DPINo: closest it got4.8 s
6-page phone scan9.49 MB100 KBSmallest + grayscale109 KB~42 DPINo: closest it got5.4 s
2-page phone scan3.16 MB200 KBKeep text165 KB~80 DPIYes0.8 s
Cover letter + 2 scans3.17 MB500 KBKeep text437 KB~120 DPIYes0.8 s
Cover letter + 2 scans3.17 MB500 KBSmallest432 KB~100 DPIYes3.8 s
30-page text document48 KB20 KBKeep text48 KBunchangedNo: closest it got0.1 s
30-page text document48 KB200 KBKeep text48 KBunchangedYes0.1 s

Checks run on every result: page count and page size unchanged, never larger than the original, Keep text leaves the text layer in place on the text and mixed files, Smallest output has no text layer, and no network request carries file data. The images test also checks reordering and that a photo with an EXIF rotation tag comes out upright.

Portal rules we left out

The product plan listed FPSC, PPSC, SPSC, KPPSC, BPSC, NTS, HEC and IBCC upload rules to verify. We could not confirm any current limit from an official page we are allowed to quote, so none is published. Limits also change from one advertisement to the next. We would rather say nothing than give you a wrong number.

Units

KB is counted as 1,000 bytes and MB as 1,000,000 bytes (NIST and BIPM define the SI prefixes). See KB vs MB.

Sources

Written and maintained by the DanixSoft team in Lahore. Last reviewed 2026-11-23.