Extract non-ASCII text from a PDF cleanly

I have a PDF file that has some non-ASCII text (Hebrew letters) that I want to extract in text form (and then convert them from unicode to HTML - that part I have covered,) but I've been unable to extract those Hebrew letters cleanly using cut & paste and couple of other methods. The file in question is attached here; thanks, Mike
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Joe Winograd, Fellow&MVEConnect With a Mentor DeveloperCommented:
I extracted just page 2 into a new PDF (attached). I'll see what I can do with it. Shalom, Joe

Update: I think the problem is that the PDF uses a font called NewJerusalem for the Hebrew letters. It's likely that whatever you're extracting the letters into (such as Word) does not have that font. So my first suggestion is to install the NewJerusalem font in whatever product into which you're extracting the letters.

Btw, I used a utility called PDFfonts to see what fonts are in that file. Here they are:

name                        type              emb sub uni object ID
--------------------------- ----------------- --- --- --- ---------
ILOLMG+NewJerusalem         Type 1C           yes yes yes     45  0
JGMAGA+Georgia              TrueType          yes yes no      47  0
IMGGBM+Times-BoldItalic     TrueType          yes yes no      49  0
IMGGDM+Times-Roman          TrueType          yes yes no      51  0
IMGGML+Times-Bold           TrueType          yes yes no      53  0
IMGKCA+TranslitLS-Bold      TrueType          yes yes no      55  0
IMGKFN+TimesNewRoman-Bold   TrueType          yes yes no      57  0
IMGKNG+TranslitLS           TrueType          yes yes no      59  0
ILOHMB+TranslitLS           CID TrueType      yes yes no      62  0
IMGOPD+TranslitLS-Bold      TrueType          yes yes no      64  0
IMGPDA+TranslitLS           TrueType          yes yes no      66  0

Open in new window

But since you said that you left work and don't have the original file, it's possible that the original file is using some other font for the Hebrew letters. Post the original file when you get back to work and I'll let you know what fonts are in it. Or you can do it yourself, as explained in this 5-minute EE video Micro Tutorial:
Xpdf - PDFfonts - Command Line Utility to List Fonts Used in a PDF File

You should also view the first 5-minute video in the series, which explains how to download all the Xpdf utilities:
Xpdf - Command Line Utility for PDF Files

Regards, Joe
Joe Winograd, Fellow&MVEDeveloperCommented:
Hi Mike,
I may have a solution for you, but I'd like to test it first on your file, which wasn't attached. Please attach it and I'll work on it right away. Regards, Joe
hadronsAuthor Commented:
Hi, Joe, I left work and I don't have the original file (I can get it later,) but this file I download is a good representation (just the second page, I couldn't figure out how to extract just that and cut the rest.) Thanks, Mike
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

hadronsAuthor Commented:
HI, Joe, thanks for all the work looking into this ... here's the original file (we were off for the holiday.) Thanks, Mike
Joe Winograd, Fellow&MVEDeveloperCommented:
Here's the output from pdffonts for that file:

name                       type              emb sub uni object ID
-------------------------- ----------------- --- --- --- ---------
TimesNewRoman              TrueType          no  no  no       8  0
Verdana                    TrueType          no  no  no      14  0
MDCCHI+AGaramond-Italic    Type 1C           yes yes yes     18  0
MDCCJJ+AGaramond-Regular   Type 1C           yes yes yes     23  0
MDCCNI+MSTT31c344          Type 1C           yes yes no      28  0
MDCCPI+MSTT31c34f          Type 1C           yes yes no      32  0

Open in new window

The Hebrew letters are in the fonts MSTT31c344 and MSTT31c34f (I'm not familiar with either one).

I want to let you know that I'm going offline soon for the rest of today and tonight. Will check back into the thread tomorrow morning to see how you're doing. Regards, Joe
hadronsAuthor Commented:
Identifying the font and importing into what application is being used is the best approach as Joe worked out. The unknown font throw off a solution, but the overall approach suggested is the best.
Joe Winograd, Fellow&MVEDeveloperCommented:
Thanks for the update. Regards, Joe
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.