PDF text shows as boxes or gibberish: what broke and what fixes it
By the getPDF team · Published 11 October 2026
The short answer
Boxes and gibberish are 2 different faults. Boxes mean the font is not in the file and the viewer has nothing to draw the letters with: open the file in another viewer, or get a copy exported with fonts embedded. Gibberish that looks fine on screen but copies as nonsense means the font has lost its map from shapes to letters: no converter can fix that, but OCR reads the page like your eyes do and gives the words back. Inspect below shows which fonts are embedded.
Try it here, nothing is uploaded
Which of the 2 faults do you have?
| What you see | What broke | First test | Fix |
|---|---|---|---|
| Squares, dots or blank gaps on the page | The font is not embedded and the viewer cannot substitute it | Inspect: the font says “not embedded” | Another viewer, then a re-export with fonts embedded |
Page looks right, copy or search gives nonsense like RIILFH |
The font’s map from shapes to letters is missing or wrong | Copy a line, or run PDF to Text | OCR the page pictures |
| Page itself shows wrong letters | Both, or a broken encoding | Inspect, then copy a line | OCR, or a new copy from the source |
The distinction matters because the fixes are opposite. Boxes are a display problem: the words are in the file correctly, a viewer just cannot draw them. Gibberish is a data problem: the drawing is right, the words behind it are wrong.
Boxes: the font is not in the file
A PDF can name a font without carrying it, trusting every computer to have it. When the computer opening the file does not, the viewer substitutes the nearest font it has. If that font lacks the characters (Polish ł, Czech č, Greek, Cyrillic), you get boxes or gaps.
- Drop the file on Inspect above. The Fonts section lists every font with “embedded” or “not embedded” and the number of pages it is on, and the summary says “Some fonts are not embedded; other devices may draw them differently” when any is missing. A name starting with 6 capitals and a plus (ABCDEF+LiberationSans) is a subset: only the letters used are embedded, which is normal and fine.
- Open the file in another viewer. Chrome, Firefox and the Mac’s Preview each substitute in their own way, and one of them may have a font with your characters.
- Ask for a re-export with fonts embedded. Most export dialogs embed by default; the files that arrive without fonts usually come from old software or settings that leave the standard fonts out to save space.
- Make a picture copy if you only need it to look right: PDF to JPG renders the pages with getPDF’s own substitute fonts (the Liberation family, which covers Latin, Greek, Cyrillic and Vietnamese). Check that the rendering is correct before you rely on it; the text in a picture copy cannot be selected.
Gibberish: the font lost its letter map
Inside a PDF, a font stores numbered shapes, and the text on the page is a list of shape numbers. A second table, the ToUnicode map, turns the numbers back into letters. Copy, search, screen readers and every converter use that map. Without it, they read the shape numbers as if they were letters.
We built a test page in an embedded Liberation Sans font and left the map out. It displays perfectly. PDF to Text gave this for “Lease agreement between Jane Cooper”:
/HDVH DJUHHPHQW EHWZHHQ -DQH &RRSHU
Every letter is shifted by the same 29 places, because in that font the shape for “a” is number 68 while the letter’s code is 97. Chrome uses the same engine as getPDF (PDFium), so copying from Chrome gives the same result. And Inspect does not catch it: it showed the font as embedded and the page as having text, both true.
No tool can rebuild the map, because the information is not in the file. What works is reading the page the way a scanner would:
- Turn the pages into pictures with PDF to JPG: Resolution 300, Several pages “as separate files”.
- Drop the pictures on JPG to PDF to get one PDF with a page per picture.
- Run OCR PDF on it in the document’s language, and press Make it searchable.
On our test page that gave clean, searchable text at 91 % average confidence. “Lease agreement” came back as “Lease agreenent” and “October” as “Cctober”, so read names, numbers and dates before you rely on them; OCR names the words it was unsure of.
The shortcut is OCR straight on the original with Pages with text set to “read again too”. Without that setting OCR leaves the page alone and says every page already has text, which is true even when the text is nonsense. The shortcut read our page at 85 %, and search then finds the right words, but the nonsense stays in the file and comes first when you copy, so the picture route gives the cleaner copy.
Both at once, or the page itself is wrong
When the page shows the wrong letters (not boxes, not a perfect page), the font is missing and its encoding is broken too. A viewer guesses, and every viewer guesses differently. Try 2 viewers; if one draws it right, print the file to a new PDF from that viewer, then run the picture and OCR steps above on the new file. If none draws it right, the intended look is not recoverable from this file, only from the source document.
The honest part
- A file whose fonts are neither embedded nor installed anywhere cannot be restored to its intended look. A substitute font approximates it; spacing and line breaks drift.
- OCR is a reading, not a copy. On clean printed text it is right nearly everywhere; it still gets the odd word wrong, and it does not bring back fonts, columns or tables as structure.
- Flattening does not help with either fault. It bakes form fields and notes into the page, but text stays text in the same font.
- Nothing here uploads the file. Inspect, PDF to JPG, JPG to PDF and OCR all run in your browser on your device.
Stop it happening to your own files
Export with your app’s own Save as PDF or Export to PDF rather than an old PDF printer driver, and check the result in Inspect before you send it: every font should say “embedded”. If a font refuses to embed (some licences forbid it), switch to a font that allows it for documents that travel. Text that copies cleanly from the PDF also reads aloud correctly in a screen reader, which is one more reason to test a line before sending. The other copy-and-paste failures, scrambled order and missing fi and fl, are in the jumbled PDF text guide.
Questions
Why does my PDF show squares instead of letters?
The font is not inside the file and the viewer has nothing that can draw those characters, so it draws empty boxes. Try another viewer first; each substitutes differently. The lasting fix is a copy exported with its fonts embedded.
The PDF looks fine but copies as nonsense. Why?
The font carries the letter shapes but not the map from shapes back to letters. Your eyes read the shapes; copy, search and every converter read the map. The text has to be read from the picture of the page, with OCR.
Can Inspect tell me the text will copy as gibberish?
No. It lists each font and whether it is embedded, which predicts boxes, but a font without its letter map still shows as embedded with text on the page. The only test is to copy a line or run PDF to Text.
Does getPDF's editor have this problem?
When you edit text in a font the file does not fully carry, the editor uses a bundled Liberation font and says so. Scripts no bundled font has (Arabic, Chinese, Thai and others) it refuses with a message instead of writing boxes.
The tools for this job
Keep reading
- Fix a broken PDF free: find the real fault, recover what you canA broken PDF is usually a cut-short download, not deep corruption.
- PDF fonts changed on another computer: embedding, explainedPDF fonts change on another computer when they are not embedded in the file.
- Why the same PDF looks different in different viewersThe same PDF looks different in different viewers because each draws fonts, transparency and forms its own way.
- Recover text from a damaged PDF: the honest optionsRecover text from a damaged PDF with the options that work today: text extraction, a clean copy first, OCR for garbled pages.
- Text copied from a PDF comes out jumbled: why, and what fixes itCopy and paste from a PDF comes out jumbled: wrong order, gibberish or glued words.