Solved

Extract non-ASCII text from a PDF cleanly

Posted on 2016-09-02
7
95 Views
Last Modified: 2016-09-07
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
0
Comment
Question by:hadrons
  • 4
  • 3
7 Comments
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 41782161
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
0
 

Author Comment

by:hadrons
ID: 41782289
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
9780521885423_excerpt.pdf
0
 
LVL 52

Accepted Solution

by:
Joe Winograd, EE MVE earned 500 total points
ID: 41782337
Mike,
I extracted just page 2 into a new PDF (attached). I'll see what I can do with it. Shalom, Joe
MikePage2.pdf

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
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:hadrons
ID: 41786726
HI, Joe, thanks for all the work looking into this ... here's the original file (we were off for the holiday.) Thanks, Mike
9783039111398_Excerpt_005.pdf
0
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 41786829
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
0
 

Author Closing Comment

by:hadrons
ID: 41788484
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.
0
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 41788638
Mike,
Thanks for the update. Regards, Joe
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
Inserting page numbers in Portable Document Files not only enhances manageability but also makes them look professional. With numbered pages, the file appears more organized and it becomes easier to search for a particular page. The size and the vol…
This video is the first in a two-part series that discusses PaperPort's "Send To Bar" feature . This first video tutorial explains the purpose of the Send To Bar, how to use it, and how to hide unwanted items that are automatically created on it whe…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now