Skip to content
PdfDady

How to copy text from a PDF, and why it sometimes comes out as nonsense

By the PdfDady team · Updated · 7 min read

If the PDF contains real text, you can select it in any PDF viewer and copy it, or take all of it at once with our PDF to Text tool. If the PDF is a scan, there is no text in it to copy, only a picture of text, and you need OCR (text recognition) first.

That one distinction explains most of the trouble people have. The rest comes down to fonts, which is why copied text sometimes turns into boxes or random letters, especially from older Hindi documents.

Check which kind of PDF you have

Open the PDF and try to select a single word by dragging across it (on a phone, press and hold on a word).

  • A word highlights neatly: real text. Copying will work.
  • Nothing highlights, or the whole page gets selected like a photo: it is a scan.
  • Search finds nothing for a word you can plainly see on the page: also a scan, or a file with a font problem.

PDFs that come out of software are text PDFs: a bill from your electricity board's site, a bank statement, a form saved from Word. PDFs made with a scanner, a photocopier's scan button or a phone camera are images. Some scanner apps add a hidden text layer with OCR, which is why a few scans do let you select text.

Copying all the text at once

Selecting by hand is fine for a line or two. For pages of text, extracting is quicker.

  1. Open PDF to Text and add your PDF (one file, up to 100 MB). If it is password-protected, enter the password. It is used only in your browser to open the file.
  2. Wait a moment. The text of every page appears in a box.
  3. Decide whether you want page markers. Lines such as --- Page 1 --- show where each page begins. Switch them off if you want one continuous block.
  4. Tap copy, or download extracted-text.txt.

The download is a plain UTF-8 text file, so Hindi, Tamil and other scripts survive when you open it in Notepad, Word or Google Docs. The PDF is read in your browser and is not uploaded.

What you get, and what you don't

You get the words. You don't get the layout.

  • Tables become lines of text. The columns are gone, so numbers that sat side by side may now sit on separate lines. For a statement or a marks table, expect to tidy up.
  • Columns are flattened. A two-column page comes out as lines of plain text.
  • Formatting is dropped. No bold, no fonts, no images.

There is also a quirk every PDF shares. A PDF stores where each line sits on the page, not where paragraphs begin and end. Copied text therefore often has a line break at the end of every printed line. Pasting into Word and removing the extra breaks with Find and Replace is the usual cure.

If you need a table to stay a table, copying text is the wrong method. Ask the sender for the original spreadsheet, or check whether the site offers a CSV or Excel download. Many bank sites do for statements.

Why copied text comes out garbled

You select a clean-looking sentence, paste it, and get boxes, question marks or a string of wrong letters. The PDF isn't broken. This is about how fonts are stored.

Inside a PDF, text is recorded as codes that point to shapes in a font. To turn those codes back into letters you can paste, the file needs a lookup table that says which code is which character. The PDF specification provides for this (it calls the table a ToUnicode map). When the software that made the PDF left it out, or wrote it badly, a viewer can still draw the page perfectly, because drawing only needs the shapes. Copying fails, because nobody recorded what the shapes mean.

Things to try:

  • Another viewer. Chrome, Edge, Adobe Reader and your phone's viewer handle damaged font tables a little differently. One may do better.
  • A fresh copy. If the PDF came from a website, download it again or use the site's own "download statement" option instead of a print-to-PDF copy.
  • OCR. If the text is garbled in every viewer, treat the page as a picture and let OCR read it (see below). This sidesteps the font problem entirely.

Hindi PDFs

Hindi works when the PDF contains real Unicode Devanagari. Text typed in a modern font such as Mangal or Nirmala UI, on a current phone or computer, is normally stored that way, and it comes out as proper Hindi you can paste anywhere.

Two things go wrong with Hindi more than with English.

Legacy fonts. A great deal of older Hindi typing, including many office and government documents, was done in fonts such as Kruti Dev. These fonts don't use Unicode. They put Devanagari shapes on the keys of the English alphabet. On the page you see Hindi. Underneath, the file holds English letters and symbols, so that is what you get when you copy. Our tool can't correct this either: text from such files may come out garbled. Converters that turn Kruti Dev text into Unicode exist, but you need to know which font was used, and the result usually needs proofreading.

Matras and conjuncts in the wrong order. Devanagari is drawn by rearranging and combining characters (the short i matra, for instance, is drawn before the consonant it follows). Some PDFs record the drawing order, not the reading order, so copied words can have matras misplaced. Read the pasted text through before you use it in anything official.

For a short passage with either problem, retyping is often faster than repairing.

Scanned PDFs: you need OCR

PdfDady does not offer OCR yet. If a page is just an image, PDF to Text tells you so instead of handing you an empty file, but it can't read the picture.

What you can do without installing much:

  1. Turn the page into an image with PDF to JPG. Pick just the pages you need and choose 300 DPI, since text recognition works better with more pixels.
  2. Open the image in something that can read text in pictures. On an iPhone XS, XR or later with iOS 15 or later, Live Text lets you press and hold on words in a photo and copy them. Apple supports a limited list of languages for this, so check its list for yours. On Android, Google Lens offers a similar copy-text option.
  3. Paste the text and proofread it against the original.

OCR makes mistakes. It confuses 0 with O, 1 with l, and drops matras in Hindi. Never paste OCR output for an account number, an IFSC code, a roll number or an Aadhaar number without checking every character against the page.

Common problems

"No text was found." The PDF is scanned. See the OCR steps above.

Some pages have text and some don't. Mixed files are common: a typed application with scanned certificates attached. Only the typed pages will give text.

The text is there but in a strange order. Multi-column pages, and pages with text boxes or side notes, are read in the order the file stores them. Rearranging by hand is the only fix.

The viewer won't let you copy. Some PDFs are set to block copying. If the file is yours and it opens without a password, Unlock PDF can remove those restrictions.

Questions people ask

Can I copy text from a PDF on my phone?

Yes. Press and hold on a word in your PDF viewer to select, or use PDF to Text in the phone's browser to take everything at once.

Why can't I select text in my PDF?

Most likely it is a scan, so the page is a picture. Less often, the file blocks copying.

Can I convert the PDF to Word instead?

PdfDady doesn't convert PDFs to Word. PDF to Text gives you plain text, which you can paste into Word and format yourself.

Does it work with Hindi?

Yes, when the PDF holds real Hindi text. PDFs made with older non-Unicode fonts may come out garbled, and scanned Hindi pages need OCR.

Is my PDF uploaded?

No. The text is read in your browser and the file stays on your device.

Sources