<?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: KovaPDF</title>
    <description>The latest articles on DEV Community by KovaPDF (@kovapdf).</description>
    <link>https://dev.to/kovapdf</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%2F4219303%2F44a5e1e1-8a6c-4c74-bdc4-5e8a900c6c86.png</url>
      <title>DEV Community: KovaPDF</title>
      <link>https://dev.to/kovapdf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kovapdf"/>
    <language>en</language>
    <item>
      <title>Your PDF shows text, but there is none: detecting outlined letters</title>
      <dc:creator>KovaPDF</dc:creator>
      <pubDate>Mon, 23 Nov 2026 07:55:13 +0000</pubDate>
      <link>https://dev.to/kovapdf/your-pdf-shows-text-but-there-is-none-detecting-outlined-letters-1opf</link>
      <guid>https://dev.to/kovapdf/your-pdf-shows-text-but-there-is-none-detecting-outlined-letters-1opf</guid>
      <description>&lt;p&gt;A form came to us that looked completely normal. Logo at the top, labels, lines to write on, a small table. Then we tried to work with it.&lt;/p&gt;

&lt;p&gt;You could not click a single word. Search found nothing. Copy and paste gave an empty clipboard. Our own OCR tool said the file "already had real text" and skipped it, and PDF to Word called it a scan.&lt;/p&gt;

&lt;p&gt;None of that was true. The page had no text at all, and it was not a scan either. Every letter had been turned into a drawing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "outlined text" means
&lt;/h2&gt;

&lt;p&gt;Design apps have an export option usually called "convert text to outlines" or "create outlines". Designers use it so a file looks the same on every machine, even if the font is not installed. The app replaces each letter with the vector shape of that letter: a few curves, filled black.&lt;/p&gt;

&lt;p&gt;Inside the PDF this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;no font in the page resources&lt;/li&gt;
&lt;li&gt;no text drawing operators (&lt;code&gt;Tj&lt;/code&gt;, &lt;code&gt;TJ&lt;/code&gt;) in the content stream&lt;/li&gt;
&lt;li&gt;thousands of path operators instead (&lt;code&gt;m&lt;/code&gt;, &lt;code&gt;l&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To your eyes it is text. To any program it is a picture made of lines, like a logo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why tools get it wrong
&lt;/h2&gt;

&lt;p&gt;Most PDF tools ask two questions about a page:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does it have text? If yes, treat it as a normal document.&lt;/li&gt;
&lt;li&gt;If not, does it have an image? If yes, it is probably a scan, so run OCR.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An outlined page answers "no" to both. There is no text, and there is no image either, only vector paths. So the page falls through both checks and gets treated as blank, or as decoration. That is exactly the bug we had: the "no text, no image" case was being counted as a text page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Detecting it
&lt;/h2&gt;

&lt;p&gt;The fix is to look at what the page actually draws. With pdf.js you can count operators from &lt;code&gt;getOperatorList()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pdfjs&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"pdfjs-dist"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="no"&gt;OPS&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pdfjs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;looksLikeOutlinedText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;fnArray&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getOperatorList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;paths&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;images&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;fnArray&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="no"&gt;OPS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;showText&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="no"&gt;OPS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;showSpacedText&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="no"&gt;OPS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;constructPath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;paths&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="no"&gt;OPS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;paintImageXObject&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="no"&gt;OPS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;paintInlineImageXObject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;images&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;paths&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The number 300 is a judgement call, not a law. A simple chart or a logo can have a few dozen paths; a page of outlined letters usually has hundreds or thousands. Tune it on your own files. A stricter check also looks at the size of the paths: letters are many small closed shapes sitting on the same baselines, while a diagram has fewer, larger ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do once you know
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Reading it.&lt;/strong&gt; Render the page to an image (around 300 dpi) and run OCR, exactly as you would for a scan. Then you get words with positions, and you can put an invisible text layer on top so search and copy work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Editing it.&lt;/strong&gt; This is where we learned the hard way. Our first version placed the new word on top of the old one, which looked fine on screen but saved the new text over the old letter shapes, so both printed. To replace a word you have to remove the paths that fall inside that word's box. Bold letters are often drawn twice (a fill and a stroke), so you need to remove both or a ghost outline stays behind. Then draw the new text in a font that matches the size and weight of the shapes you removed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Converting it.&lt;/strong&gt; For PDF to Word, OCR the page first and build paragraphs from the OCR lines. Do not let leftover letter shapes or dotted leader lines feed a table detector. On our test form they turned into a grid of narrow, empty table columns.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note for people who make forms
&lt;/h2&gt;

&lt;p&gt;If a PDF is meant to be filled in, searched or edited later, export it with the fonts embedded instead of outlined. Embedded fonts keep the look just as well, and the file stays readable by people, screen readers and every tool that comes after.&lt;/p&gt;

&lt;p&gt;We ran into this while building the PDF editor at KovaPDF. Outlined pages are now detected and read with OCR there, so the words can be clicked and changed: &lt;a href="https://www.kovapdf.com/edit-pdf" rel="noopener noreferrer"&gt;https://www.kovapdf.com/edit-pdf&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>ocr</category>
    </item>
    <item>
      <title>Why phone scans of text come out broken, and what a scanner filter should do about it</title>
      <dc:creator>KovaPDF</dc:creator>
      <pubDate>Sun, 22 Nov 2026 15:53:41 +0000</pubDate>
      <link>https://dev.to/kovapdf/why-phone-scans-of-text-come-out-broken-and-what-a-scanner-filter-should-do-about-it-340p</link>
      <guid>https://dev.to/kovapdf/why-phone-scans-of-text-come-out-broken-and-what-a-scanner-filter-should-do-about-it-340p</guid>
      <description>&lt;p&gt;You hold the phone over a letter, tap the shutter, and the app hands you a crisp white page. Then you zoom in and the small print looks chewed: letters with holes in them, thin lines that fade out halfway, a grey footer that is simply gone.&lt;/p&gt;

&lt;p&gt;We hit this while building the document scanner in our own app, and the cause was not where we first looked. This post walks through what actually breaks the letters, how to measure it, and the fix that worked for us.&lt;/p&gt;

&lt;h2&gt;
  
  
  The photo was fine. The filter broke it.
&lt;/h2&gt;

&lt;p&gt;The first instinct is to blame the camera or the resolution. So we saved the raw photo before any filtering and compared.&lt;/p&gt;

&lt;p&gt;Two shots of the same printed page, same light:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A sharp shot.&lt;/strong&gt; After the "Auto" filter, the letters were clean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A slightly soft shot&lt;/strong&gt;, the normal kind you get holding a phone by hand. In the raw photo every word was still readable. After the filter, the small print was broken into fragments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same result at full size and at a reduced size, so it was not resolution, and not the save path either. The filter was turning readable soft text into broken text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a "make the paper white" filter eats soft letters
&lt;/h2&gt;

&lt;p&gt;Most scanner filters do roughly three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Estimate the paper colour and push it to pure white (a white point).&lt;/li&gt;
&lt;li&gt;Apply a steep tone curve so ink gets darker and paper gets whiter.&lt;/li&gt;
&lt;li&gt;Sharpen a little.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On a sharp photo, a letter stroke is a dark core with a very thin grey edge. The curve makes the core black, the edge falls either way, and the letter looks crisp.&lt;/p&gt;

&lt;p&gt;On a soft photo, the same stroke is a dark core with a &lt;strong&gt;wide&lt;/strong&gt; grey fringe. Now the steep curve does something nasty: everything lighter than the cut-off goes to white. The fringe vanishes, and because the core of a thin stroke is itself not very dark when it is blurred, parts of the core vanish too. You get letters with holes along their edges.&lt;/p&gt;

&lt;p&gt;It gets worse with a page-level strength setting. If the filter decides how hard to darken ink by looking at the boldest things on the page (a heading, a table border), then on a page with a strong title it concludes "ink is already dark enough" and gives the faint small print no lift at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure it before you fix it
&lt;/h2&gt;

&lt;p&gt;We did not trust our eyes for this. Two numbers helped:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Coverage in a text band:&lt;/strong&gt; in a strip of small print, the share of pixels darker than a threshold. Broken letters show up as low coverage compared with a clean render of the same text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core lightness of a thin grey line:&lt;/strong&gt; a printed grey rule should come out grey and whole, not white and not black.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then we built synthetic test pages: render a page with known text, blur it by a known amount, add noise and a JPEG round trip, run the filter, and compare against the clean render. That turns "looks a bit broken" into a failing test you can fix against, and it stops a fix for soft text from quietly making sharp text look fake-bold.&lt;/p&gt;

&lt;h2&gt;
  
  
  What fixed it
&lt;/h2&gt;

&lt;p&gt;The change that worked was to &lt;strong&gt;restore the stroke before the tone curve, per stroke, not per page&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A second sharpening pass at the blur's own scale, so the fringe is pulled back into the stroke before anything is pushed to white.&lt;/li&gt;
&lt;li&gt;Re-measure how much each stroke needs after that restoration, instead of using one strength for the whole page. Shallow strokes get lifted, bold ones are left alone.&lt;/li&gt;
&lt;li&gt;Shape the curve so a blurred stroke keeps its mid-tones (near linear), while a sharp stroke keeps the usual crisp core.&lt;/li&gt;
&lt;li&gt;Gate it carefully: only near strokes, only on neutral (non-coloured) pixels so stamps and colour blocks are untouched, and not on dim, grainy photos where extra sharpening would just amplify noise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On our soft test photo, the grey line went from badly broken to whole (its dark-pixel share rose by about half) and the bottom sentence went from pale grey to readable black, while sharp photos produced the same output as before. The honest cost: a faint speckle on empty paper that you can see at 2x zoom.&lt;/p&gt;

&lt;h2&gt;
  
  
  The camera side matters too
&lt;/h2&gt;

&lt;p&gt;A filter can only rescue so much. Two camera changes reduced how often it has to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wait for focus before the shot.&lt;/strong&gt; Lock focus at the page centre and give it a short time limit (we use well under a second), so the shutter still feels instant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check sharpness right after the shot.&lt;/strong&gt; The variance of the Laplacian over the page area is a cheap, reliable blur score. If a shot is clearly soft, retake once automatically, then keep whatever comes next so the user is never stuck in a loop. A blank or very flat page should never be called soft.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When scans look broken, save the raw photo first. Often the photo is fine and the filter is the problem.&lt;/li&gt;
&lt;li&gt;Blur widens strokes into grey fringes, and steep white-point curves delete those fringes.&lt;/li&gt;
&lt;li&gt;Decide strength per stroke, not per page.&lt;/li&gt;
&lt;li&gt;Write tests with synthetic blur levels so a fix for soft text cannot make sharp text worse.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We are working through this in the scanner of KovaPDF, our PDF app. If you want to see the web tools it sits next to, they are at &lt;a href="https://www.kovapdf.com" rel="noopener noreferrer"&gt;https://www.kovapdf.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>imageprocessing</category>
      <category>android</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why text copied from some Bangla and Hindi PDFs comes out scrambled, and a 10 second test</title>
      <dc:creator>KovaPDF</dc:creator>
      <pubDate>Wed, 18 Nov 2026 13:45:38 +0000</pubDate>
      <link>https://dev.to/kovapdf/why-text-copied-from-some-bangla-and-hindi-pdfs-comes-out-scrambled-and-a-10-second-test-4dl0</link>
      <guid>https://dev.to/kovapdf/why-text-copied-from-some-bangla-and-hindi-pdfs-comes-out-scrambled-and-a-10-second-test-4dl0</guid>
      <description>&lt;p&gt;You open a PDF in Bangla or Hindi. It looks perfect on screen. You copy one line, paste it into a chat or a search box, and get something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;On the page:   নমুনা প্রতিষ্ঠান লিমিটেড
After copying: নীমু নী প্র থিষ্ঠা নী থিথিমু টেড
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same file, same line. The page is fine, the text behind the page is not. This post explains why that happens, how to test any PDF in about ten seconds, and what to do about it as the person who makes the PDF and as the person who receives it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A PDF stores two things: the picture and the meaning
&lt;/h2&gt;

&lt;p&gt;When a PDF draws a word, it does not store letters the way a Word file does. It stores &lt;strong&gt;glyph numbers&lt;/strong&gt;: "draw shape 412 of this font here, then shape 87 there". That is enough to paint the page.&lt;/p&gt;

&lt;p&gt;To get text back out (copy, search, screen readers, translation, AI summaries, PDF to Word), a reader needs a second piece of information: which Unicode characters each shape stands for. That map usually lives in the font's &lt;code&gt;ToUnicode&lt;/code&gt; table inside the PDF.&lt;/p&gt;

&lt;p&gt;For English this is easy. One letter, one shape, left to right.&lt;/p&gt;

&lt;p&gt;For Bengali, Devanagari and other Indic scripts it is not:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vowel signs are drawn in a different place from where they are typed.&lt;/strong&gt; In কি the vowel sign ি is typed after ক but drawn to its left.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conjuncts become one shape.&lt;/strong&gt; ক্ষ or ন্ত is typed as three characters but drawn as a single glyph.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some shapes have no single character at all.&lt;/strong&gt; A half form or a reph is a piece of a cluster, not a letter on its own.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The font engine that made the PDF knew all of this when it drew the page. If it did not write a correct map back into the file, the meaning is lost, even though the picture is perfect.&lt;/p&gt;

&lt;h2&gt;
  
  
  What goes wrong, in the order you will usually see it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Visual order instead of typed order.&lt;/strong&gt; The reader takes shapes left to right, so ি comes out before the consonant it belongs to: কিছু becomes িকছু.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conjuncts with no map.&lt;/strong&gt; The single shape for a conjunct maps to nothing, so letters vanish, or to one wrong letter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A wrong map.&lt;/strong&gt; The shapes map to other characters altogether. That is the example at the top: every reader gets the same wrong text, because the wrong text is what the file says.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Old non-Unicode fonts.&lt;/strong&gt; Some documents were typed with fonts that put Bangla or Hindi shapes on Latin keyboard codes. The text inside is Latin letters that only look right in that one font.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these show on screen. All of them break copy, Ctrl+F, screen readers and every tool that reads the text.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 10 second test
&lt;/h2&gt;

&lt;p&gt;You do not need special software for a first check.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the PDF in any viewer.&lt;/li&gt;
&lt;li&gt;Select one full line that has a few joined letters in it and copy it.&lt;/li&gt;
&lt;li&gt;Paste it into a plain text box (Notepad, a chat, a search bar) and compare it with the page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the pasted text matches, the text layer is healthy. If vowel signs jump to the start of words, letters are missing, or you see odd Latin letters inside Bengali or Hindi words, the text layer is broken.&lt;/p&gt;

&lt;p&gt;Two more signs you can see without copying anything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ctrl+F cannot find a word you can see on the page.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A screen reader reads nonsense&lt;/strong&gt; or skips the line.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you prefer the command line, Poppler's &lt;code&gt;pdftotext&lt;/code&gt; shows the same thing for a whole page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pdftotext -f 1 -l 1 -layout letter.pdf -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compare the output with the page. Try two different readers (for example &lt;code&gt;pdftotext&lt;/code&gt; and the copy in your browser's PDF viewer). If both give the same wrong text, the fault is in the file, not in the reader.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you make the PDF
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Export with a Unicode font that has proper shaping data&lt;/strong&gt; (for example Noto Sans Bengali, Noto Sans Devanagari, Nirmala UI, Mangal, Vrinda), not an old non-Unicode font.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use the program's own Export or Save as PDF&lt;/strong&gt; rather than printing to a PDF printer driver. A print driver only sees shapes; it often has no idea which characters they came from.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask for PDF/A-2u or PDF/A-3u if your program offers it.&lt;/strong&gt; The "u" level requires every character in the file to map to Unicode. It does not guarantee a perfect result for every font, but it makes the program try, and it is a clear thing to ask a supplier or a print shop for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run the 10 second test before you send the file.&lt;/strong&gt; It catches the problem while you can still fix the source.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  If you receive the PDF
&lt;/h2&gt;

&lt;p&gt;You cannot repair a wrong map from the outside with certainty, because the file itself carries the wrong meaning. What works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ask the sender for the original document&lt;/strong&gt; (Word, Google Docs) or a fresh export.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the page from its picture instead of its text layer.&lt;/strong&gt; Text recognition (OCR) looks at the shapes the way you do, so it does not care how broken the hidden text is. Clean digital pages are sharper than any scan, so good Bangla and Hindi OCR usually reads them well.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One quick way to do the second step: take a screenshot of the page and run it through an image to text tool. We built one into KovaPDF (&lt;a href="https://www.kovapdf.com/image-to-text" rel="noopener noreferrer"&gt;Image to Text&lt;/a&gt;) and tried it on the letter from the top of this post: the Bangla came back almost word for word, with only a couple of small slips in joined letters, where copying the text layer gave the scrambled line above. Any OCR you trust will do the same job; check names and numbers either way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters more than it seems
&lt;/h2&gt;

&lt;p&gt;A broken text layer is invisible to the person who made the file and to anyone who only reads it on screen. It shows up later: an applicant whose name cannot be found by search, an office notice a screen reader cannot read, a contract that an AI summary or a translation tool turns into nonsense. Ten seconds of copy and paste before sending is a cheap way to avoid all of that.&lt;/p&gt;

&lt;p&gt;If you have a PDF where even OCR struggles, or a tool that handles this well, I would like to hear about it in the comments.&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>unicode</category>
      <category>i18n</category>
      <category>a11y</category>
    </item>
    <item>
      <title>Why Windows saves your JPEGs as .jfif, and the one registry value that fixes it</title>
      <dc:creator>KovaPDF</dc:creator>
      <pubDate>Thu, 05 Nov 2026 05:42:15 +0000</pubDate>
      <link>https://dev.to/kovapdf/why-windows-saves-your-jpegs-as-jfif-and-the-one-registry-value-that-fixes-it-3cl7</link>
      <guid>https://dev.to/kovapdf/why-windows-saves-your-jpegs-as-jfif-and-the-one-registry-value-that-fixes-it-3cl7</guid>
      <description>&lt;p&gt;You right-click a photo in Chrome or Edge, choose &lt;strong&gt;Save image as&lt;/strong&gt;, and Windows offers &lt;code&gt;photo.jfif&lt;/code&gt;. Then the upload form at work, the visa portal or an older app says the file type is not allowed.&lt;/p&gt;

&lt;p&gt;The file is fine. Here is what is going on and how to stop it.&lt;/p&gt;

&lt;h2&gt;
  
  
  JFIF is just a JPEG
&lt;/h2&gt;

&lt;p&gt;JFIF (JPEG File Interchange Format) is the wrapper most &lt;code&gt;.jpg&lt;/code&gt; files have always used. A &lt;code&gt;.jfif&lt;/code&gt; and a &lt;code&gt;.jpg&lt;/code&gt; from the same source both start with the bytes &lt;code&gt;FF D8 FF E0&lt;/code&gt;, and a few bytes later the letters &lt;code&gt;JFIF&lt;/code&gt;. Same format, different ending.&lt;/p&gt;

&lt;p&gt;So for one file, renaming &lt;code&gt;photo.jfif&lt;/code&gt; to &lt;code&gt;photo.jpg&lt;/code&gt; is enough. Nothing is converted and nothing is lost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the browser picks .jfif
&lt;/h2&gt;

&lt;p&gt;When a browser saves a download whose type is &lt;code&gt;image/jpeg&lt;/code&gt;, it asks Windows which file ending belongs to that type. Windows looks it up in the registry here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HKEY_CLASSES_ROOT\MIME\Database\Content Type\image/jpeg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value named &lt;code&gt;Extension&lt;/code&gt; holds the answer. On many machines it says &lt;code&gt;.jfif&lt;/code&gt;: an app or an update set it at some point, and every browser on that machine follows it. You can check yours in PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="nb"&gt;reg&lt;/span&gt; &lt;span class="nb"&gt;query&lt;/span&gt; &lt;span class="s2"&gt;"HKCR\MIME\Database\Content Type\image/jpeg"&lt;/span&gt; &lt;span class="na"&gt;/v &lt;/span&gt;&lt;span class="kd"&gt;Extension&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the Windows 11 laptop I wrote this on, it printed &lt;code&gt;.jfif&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Open PowerShell &lt;strong&gt;as administrator&lt;/strong&gt; and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="nb"&gt;reg&lt;/span&gt; &lt;span class="kd"&gt;add&lt;/span&gt; &lt;span class="s2"&gt;"HKLM\SOFTWARE\Classes\MIME\Database\Content Type\image/jpeg"&lt;/span&gt; &lt;span class="na"&gt;/v &lt;/span&gt;&lt;span class="kd"&gt;Extension&lt;/span&gt; &lt;span class="na"&gt;/t &lt;/span&gt;&lt;span class="kd"&gt;REG_SZ&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;.jpg &lt;span class="na"&gt;/f
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Close and reopen the browser. &lt;strong&gt;Save image as&lt;/strong&gt; now offers &lt;code&gt;.jpg&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you cannot change the registry (a work laptop, a shared PC), renaming each file still works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Many files at once
&lt;/h2&gt;

&lt;p&gt;A folder full of &lt;code&gt;.jfif&lt;/code&gt; files can be renamed with one line of PowerShell, run inside that folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Get-ChildItem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*.&lt;/span&gt;&lt;span class="nf"&gt;jfif&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Rename-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-NewName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;$_&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;BaseName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'.jpg'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only the names change, so the pictures stay exactly the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  On a phone, or without a terminal
&lt;/h2&gt;

&lt;p&gt;For a phone, or when you just need a couple of files fixed in a browser, we made a small free tool that gives a &lt;code&gt;.jfif&lt;/code&gt; the &lt;code&gt;.jpg&lt;/code&gt; ending without saving the picture again, so it keeps all of its quality (it also takes out hidden details such as the location): &lt;a href="https://www.kovapdf.com/jfif-to-jpg" rel="noopener noreferrer"&gt;JFIF to JPG&lt;/a&gt;. It works without an account.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written with AI assistance. The commands were run and checked on Windows 11.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>powershell</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>That black box in your PDF is probably not a redaction: how to check in one command</title>
      <dc:creator>KovaPDF</dc:creator>
      <pubDate>Tue, 03 Nov 2026 09:58:11 +0000</pubDate>
      <link>https://dev.to/kovapdf/that-black-box-in-your-pdf-is-probably-not-a-redaction-how-to-check-in-one-command-1l5p</link>
      <guid>https://dev.to/kovapdf/that-black-box-in-your-pdf-is-probably-not-a-redaction-how-to-check-in-one-command-1l5p</guid>
      <description>&lt;p&gt;You get a PDF back from legal, HR or a client portal. The account numbers are covered with neat black boxes, so it looks safe to forward. Very often it is not.&lt;/p&gt;

&lt;p&gt;A black rectangle drawn on a page is just another shape on top of the text. The words underneath are still in the file, and anyone can get them back with copy and paste, a text extractor, or a search box.&lt;/p&gt;

&lt;p&gt;Here is how to check a PDF in a few seconds, and what a real redaction has to remove.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-command check
&lt;/h2&gt;

&lt;p&gt;If you have Poppler installed (it ships &lt;code&gt;pdftotext&lt;/code&gt;), run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pdftotext redacted.pdf - | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"4111"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;4111&lt;/code&gt; with something you expect to be gone: a name, an ID number, part of an address. If the line comes back, the "redaction" only hid the text.&lt;/p&gt;

&lt;p&gt;No command line? Open the PDF in a browser, press Ctrl+F (Cmd+F on a Mac) and search for the same word. If the viewer highlights a match under the black box, the text is still there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking it in code
&lt;/h2&gt;

&lt;p&gt;The same test in Node with &lt;code&gt;pdfjs-dist&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getDocument&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pdfjs-dist/legacy/build/pdf.mjs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pdf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;redacted.pdf&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;numPages&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTextContent&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/4111/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`page &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; still contains it`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is worth adding to any pipeline that publishes documents someone else redacted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The places people forget
&lt;/h2&gt;

&lt;p&gt;Even when the page text is really removed, the same words can survive somewhere else in the file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Comments and annotations.&lt;/strong&gt; A reviewer's note that quotes the sentence you removed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Form fields.&lt;/strong&gt; A filled field keeps its value even if you draw over it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bookmarks and link targets.&lt;/strong&gt; An outline entry named after the person or the case.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attachments.&lt;/strong&gt; A spreadsheet embedded in the PDF with the full data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata.&lt;/strong&gt; The title, subject, author and keywords in the document properties, and the XMP block next to them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hidden text on scans.&lt;/strong&gt; A scanned page with OCR has an invisible text layer under the picture. A black box over the image hides the pixels, but the OCR words are still there for search and copy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;pdfinfo -meta file.pdf&lt;/code&gt; shows the metadata, and &lt;code&gt;pdfdetach -list file.pdf&lt;/code&gt; lists attachments, so both are quick to check too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a real redaction does
&lt;/h2&gt;

&lt;p&gt;A proper redaction tool removes the content, not just covers it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It deletes the text and the parts of images inside the marked area from the page itself.&lt;/li&gt;
&lt;li&gt;It searches the rest of the file (comments, fields, bookmarks, attachments, metadata) for the same words and removes them there too.&lt;/li&gt;
&lt;li&gt;It draws the black box afterwards, as a sign that something was taken out.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After that, the check above should come back empty. If it does not, do not send the file.&lt;/p&gt;

&lt;p&gt;We built the Redact PDF tool in KovaPDF to work this way. It removes the text, the image pixels and the OCR layer under each mark, along with comments and form values there, and it can also clear the document properties, attachments and bookmarks. It also tells you where a searched word still appears elsewhere in the file: &lt;a href="https://www.kovapdf.com/redact-pdf" rel="noopener noreferrer"&gt;https://www.kovapdf.com/redact-pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whatever tool you use, run the one-command check before a redacted PDF leaves your hands. It takes five seconds and it catches the most common and most embarrassing mistake.&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>security</category>
      <category>privacy</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Getting a PDF under 200 KB for an upload form: what actually makes it smaller</title>
      <dc:creator>KovaPDF</dc:creator>
      <pubDate>Sat, 31 Oct 2026 17:20:14 +0000</pubDate>
      <link>https://dev.to/kovapdf/getting-a-pdf-under-200-kb-for-an-upload-form-what-actually-makes-it-smaller-521m</link>
      <guid>https://dev.to/kovapdf/getting-a-pdf-under-200-kb-for-an-upload-form-what-actually-makes-it-smaller-521m</guid>
      <description>&lt;p&gt;Job portals, university admissions, visa and government forms love a rule like "PDF, maximum 200 KB". Then you scan two pages on your phone, the file is 3.4 MB, and the upload button says no.&lt;/p&gt;

&lt;p&gt;We build PDF tools at KovaPDF, and "compress to an exact size" is a request we see all the time. Here is what we learned about what makes a PDF big, what makes it small, and how to hit a size limit without wrecking the document.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is actually taking up the space
&lt;/h2&gt;

&lt;p&gt;Open almost any oversized PDF and the answer is the same: pictures.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text&lt;/strong&gt; is tiny. A page of text is a few kilobytes, because it is stored as characters plus a font, not as an image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fonts&lt;/strong&gt; can add a bit, especially when a whole font is embedded instead of just the letters used, but it is rarely the main problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images&lt;/strong&gt; are the problem. A scanned page is one big photo of the paper. A phone camera picture at 12 megapixels is millions of pixels per page, often at a resolution far beyond what anyone will ever look at.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So a size target is mostly a fight with the images. Everything else is rounding.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does not help much
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zipping the PDF.&lt;/strong&gt; The images inside are already compressed, so a zip barely changes the size, and the form usually wants a .pdf anyway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Print to PDF" of a scan.&lt;/strong&gt; You get a new PDF wrapped around the same huge image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turning everything into one low quality image.&lt;/strong&gt; It hits the size, but the text is no longer text: nobody can search it or copy from it, and it often looks blurry when printed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The approach that works: lower the image resolution step by step
&lt;/h2&gt;

&lt;p&gt;What we do is lower the resolution of the pictures in steps, while leaving text and vector drawings exactly as they are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;150 DPI -&amp;gt; 110 DPI -&amp;gt; 72 DPI -&amp;gt; 50 DPI -&amp;gt; 36 DPI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After each step we check the size. The &lt;strong&gt;first result that fits the target wins&lt;/strong&gt;, because that is the version with the least quality lost. There is no point sending a 36 DPI file when a 110 DPI one is already under the limit.&lt;/p&gt;

&lt;p&gt;150 DPI is a good first step because it still prints and reads well. Most scans and photos come in at 300 DPI or more, so this step alone often takes a file from megabytes to a few hundred kilobytes. 72 DPI is roughly what a screen shows at normal zoom. Below that, small print in a scan starts to suffer, which is why it is the last resort and not the first move.&lt;/p&gt;

&lt;p&gt;Form fields are kept through the whole process, so a fillable form stays fillable.&lt;/p&gt;

&lt;h2&gt;
  
  
  "200 KB" is not one number
&lt;/h2&gt;

&lt;p&gt;Is 200 KB 200,000 bytes or 204,800 bytes? Different systems disagree. Some portals check 1 KB as 1,000 bytes and some as 1,024.&lt;/p&gt;

&lt;p&gt;We count 1 KB as 1,000 bytes when aiming. A file under 200,000 bytes is also under 204,800 bytes, so it passes either way. If you write your own tool, aim at the smaller number. A file that is 201,000 bytes and gets rejected is the worst kind of bug report.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sometimes it cannot be done, and that is fine to say
&lt;/h2&gt;

&lt;p&gt;A very long document with no pictures may not get under a small limit no matter how hard you squeeze the images, because there are none to squeeze. When no step reaches the target, the honest answer is to give back the smallest version and say clearly that it is still over the limit. Pretending the target was met, or quietly turning the text into blurry images to force it, causes more trouble later than a clear message now.&lt;/p&gt;

&lt;p&gt;What usually helps in that case:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Split the file&lt;/strong&gt; and upload the pages the form actually asks for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove pages&lt;/strong&gt; nobody needs (blank backs of scanned pages are a classic).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rescan at a sensible setting&lt;/strong&gt;: 150 DPI, grayscale for black and white documents. A grayscale scan is a fraction of the size of a colour one and reads just as well.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick checklist for anyone fighting an upload limit
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Find out what is big: if it is a scan or has photos, the images are the target.&lt;/li&gt;
&lt;li&gt;Lower image resolution first, keep the text as text.&lt;/li&gt;
&lt;li&gt;Stop at the first version that fits; do not go lower than you need.&lt;/li&gt;
&lt;li&gt;Aim below the limit counted in 1,000 byte kilobytes.&lt;/li&gt;
&lt;li&gt;If it still does not fit, split the file or rescan in grayscale at 150 DPI.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you just want it done, our &lt;a href="https://www.kovapdf.com/compress-pdf-to-200kb" rel="noopener noreferrer"&gt;compress PDF to 200 KB&lt;/a&gt; tool does exactly the steps above and tells you the final size before you download. There are presets for other common limits too, from 50 KB to 10 MB.&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
