Saifullah Ahad

All one hundred eight build stories

KorjataLive on Google Play

PDF copy paste weird characters? Test one word first

When a PDF pastes weird characters, pick one word you can read on the page. Copy it into a plain text editor and compare the letters one by one.

Search for both spellings

On the PDF pageplanet
In the pasted textp1anet

Here the lowercase L in planet has become the digit 1. Type planet into the PDF reader's search box yourself. Then try p1anet. If only the second spelling finds the word, the reader can draw the right letter while copying and searching the wrong one.

After you copy a line, Penn State's PDF Test Protocol gives this check for text encoding. "Paste it into Microsoft Word or other text editor and see if the output is the same."

Can you select the letters?

When you cannot copy text from a PDF without strange characters, try selecting a single word. Does the reader highlight its letters, select the whole page as a picture, or give you a message about copying?

What you seeWhat to try
Wrong lettersCopy a heading and a line of body text separately. If only one pastes badly, its font may have a broken letter map. Ask the author for a fresh PDF exported from the original document.
Only an imageIf the page is a scan with no selectable text, run optical character recognition (OCR) on a copy. Compare a sentence from the result with the scan.
Copy disabledIf the reader says copying is restricted, ask the owner for a copy that allows text extraction.

On a scan with two columns, check which sentence follows the last line of the first column. W3C's guide to OCR for scanned PDFs suggests this test. "Save the document as text and check that the converted text is complete and in the correct reading order."

One shape, two possible readings

I built Korjata for PDFs with embedded fonts. It uses the letter shapes and the words around them to rebuild the table that links each shape to text. For a PDF it can repair and save, it writes that table into a new copy.

In the example below, one shape appears 567 times. It could be a lowercase d or the letters c and l touching. Read the word around the shape before choosing. If both readings seem plausible, you can leave it unsure.

Korjata shows a letter beside its word and offers a lowercase d or a joined c and l.
The first of three questions shows a shape used 567 times in the file.
Korjata lines up the shapes from a Times New Roman font with the letters it assigned to them.
Of the 70 shapes in this font, six are marked unsure. An unmarked letter can still be wrong.

Korjata handles Latin, Cyrillic and Greek letters in supported fonts. Open the saved copy in your usual reader and repeat the one-word test. Before quoting a paper, compare formulas and codes with the page too. A zero in place of a capital O can change a result even when the sentence reads smoothly.

What was not checked

The device checks covered two tablets. On a Galaxy Tab S3, Korjata read an x in an English passage as a comma. The Russian passage was checked on an Honor Pad X7 using a development build.

  • A full read-through with TalkBack was still pending at release.
  • The release checks did not include a phone-sized device.

Email Saifullah Explore all one hundred eight stories