Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^4: Extracting content text from PDFs

by almut (Canon)
on Apr 16, 2008 at 03:32 UTC ( #680725=note: print w/replies, xml ) Need Help??

in reply to Re^3: Extracting content text from PDFs
in thread Extracting content text from PDFs

If there are limits to what PDFs work and what don't I have not run into them :)

You've just been lucky so far :)

Some PS/PDF tools are using font subsetting/re-encoding techniques which (when done in a certain way) can make automatic text extraction very hard. (I've tried to explain the method in more detail in another thread.)

To illustrate, here's a sample PDF which you can view with Adobe Reader, xpdf, Ghostscript, etc. without problems (you should see the standard "lorem ipsum" text). Any attempt to extract the textual content will likely fail, however, although the file is a perfectly valid PDF containing nothing but regular text content (no images, no encryption, no other tricks) with all characters being part of the ASCII set.

Of course, I deliberately created the file in the above mentioned way (as "proof of concept"), but there are actually PDF creation tools out there which do produce such problematic PDFs.

  • Comment on Re^4: Extracting content text from PDFs

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://680725]
[marto]: use dreamweaver they said, it's brilliant they told me...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2018-07-20 12:51 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (431 votes). Check out past polls.