?
Solved

Extract non-ASCII text from a PDF cleanly

Posted on 2016-09-02
7
Medium Priority
?
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
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 55

Accepted Solution

by:
Joe Winograd, EE MVE 2015&2016 earned 2000 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

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 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
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 55

Expert Comment

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
In a previous article here at Experts Exchange (http://www.experts-exchange.com/articles/18414/Create-a-PDF-file-with-Contact-Sheets-montage-of-thumbnails-for-all-JPG-files-in-a-folder-and-each-of-its-subfolders-using-an-automated-batch-method.html)…
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

770 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