4
$\begingroup$

SORRY that I have tried 5 different files, which were too complicated for MMA to import. So I thought that maybe it just does not read any files. But I was wrong. So edited my question.

In here, is a PDF file that MMA would not read.

Import::general: Expected cross reference table >>

Import::general: Expected cross reference table >>

Import::general: Could not find document trailer >>

General::stop: Further output of Import::general will be suppressed during this calculation. >>

Why does it not read this "simple" PDF file?

Sometimes, MMA would not read a different PDF and gives some error. Is there a list of features that MMA does support for PDF files?

$\endgroup$
  • $\begingroup$ Do you mean that it doesn't work with any PDF files? Did you try any other files at all? Does ImportString@ExportString[Graphics[Circle[]], "PDF"] work? $\endgroup$ – Szabolcs Dec 29 '14 at 23:07
  • $\begingroup$ This message simply means that PDF.exe has crashes. Windows likes to say that "it stopped working" but despite what that phrasing suggest that doesn't mean it won't work in the future. $\endgroup$ – Szabolcs Dec 29 '14 at 23:08
  • $\begingroup$ @Szabolcs None of the PDF files work. I think the file PDF.exe has just corrupted (broken). $\endgroup$ – Chen Stats Yu Dec 29 '14 at 23:08
  • $\begingroup$ Can you post an example of a simple PDF that you cannot import even after restarting Mathematica? $\endgroup$ – Szabolcs Dec 29 '14 at 23:09
  • $\begingroup$ @Szabolcs Yes, I understand. All I want to know is that since MMA calls this PDF.exe file, apart from reinstall the whole 5G program again. Is there any other work around? $\endgroup$ – Chen Stats Yu Dec 29 '14 at 23:10
3
$\begingroup$

I can confirm that neither Mathematica 10, nor Mathematica 9 will import this file. Your installation is not broken.

There is (very likely) nothing you can do to make Mathematica read this file. Your best best is transforming the PDF without changing it visually, then trying to import it again. There are many programs that can do this, including Adobe Acrobat, Ghostscript (pdfopt?), OS X Preview, Multivalent, etc.

I tried File -> Export as PDF... from OS X Preview and the result can be read with Mathematica (though the colours are lost upon import).

$\endgroup$
  • $\begingroup$ Yes, thanks. Like in the original post, I was just exploring the feature of reading PDF files. Is there a particular reason this files can not be read? I would not think there is anything speacil. On a similar related question, the PDF files can not be edited corrected using Adobe Acrobat, the text(values) CHANGES. mathematica.stackexchange.com/questions/69287/… $\endgroup$ – Chen Stats Yu Dec 29 '14 at 23:46
  • $\begingroup$ I should clarify, the related problem was that Acrobat can not correctly process the PDF files produced by MMA 10.0.1 X64 (Win7). $\endgroup$ – Chen Stats Yu Dec 29 '14 at 23:49
  • $\begingroup$ I don't know. Mathematica's PDF reader is somewhat limited. Also, this is a version 1.6 PDF for Acrobat 7 and later only. Maybe Mathematica will do better on earlier version PDFs. The oneI exported from Preview is PDF version 1.3. $\endgroup$ – Szabolcs Dec 30 '14 at 0:12
  • $\begingroup$ Fair enough. But for the record, the related problem was the other way around. I was using the PDF files produced by MMA V10. Acrobat X (V10) can't process all of them correctly. That's just odd. Thanks for the help! $\endgroup$ – Chen Stats Yu Dec 30 '14 at 0:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.