Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to import PDF and extract text from it

Import["D:\\Vegetarian MS.pdf", {"PDF", "Plaintext"}]

but with some files I have a problem like this

Import::general: Unimplemented operator ' encountered >>

Import::general: Could not draw page 1 stream 0 >>

Import::general: Could not draw page 1 >>

How can I solve this? Thank you

link to file http://dl.dropbox.com/u/15137276/Vegetarian%20MS.pdf

share|improve this question
    
I'd try to reprocess the PDF using some tool that can do this (GhostScript's pdf2pdf, xpdf (??), Multivalent (get the older version),pdftk, or if you have it: Acrobat). Then you can try importing again and hope it works. Or just use one of these tools to extract the text from the PDF. – Szabolcs Jun 13 '12 at 12:56
    
I used Acrobat and saved it as optimized pdf. It imports fine that way. – Sjoerd C. de Vries Jun 13 '12 at 13:19
    
Printing to CutePDF made for an importable file, but text was slightly garbled. – Sjoerd C. de Vries Jun 13 '12 at 13:24
    
I extract text with xpdf. – mike_price Jun 13 '12 at 13:32
    
Thanks all. Just I used to run Mathematica script that extract text from a set of files through all subdirectory – mike_price Jun 13 '12 at 13:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.