4
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Szabolcs Jun 13 '12 at 12:56
  • $\begingroup$ I used Acrobat and saved it as optimized pdf. It imports fine that way. $\endgroup$ – Sjoerd C. de Vries Jun 13 '12 at 13:19
  • $\begingroup$ Printing to CutePDF made for an importable file, but text was slightly garbled. $\endgroup$ – Sjoerd C. de Vries Jun 13 '12 at 13:24
  • $\begingroup$ I extract text with xpdf. $\endgroup$ – mike_price Jun 13 '12 at 13:32
  • $\begingroup$ Thanks all. Just I used to run Mathematica script that extract text from a set of files through all subdirectory $\endgroup$ – mike_price Jun 13 '12 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.