4

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?

Chen Stats Yu
  • 4,986
  • 2
  • 24
  • 50
  • 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? – Szabolcs Dec 29 '14 at 23:07
  • 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. – Szabolcs Dec 29 '14 at 23:08
  • @Szabolcs None of the PDF files work. I think the file PDF.exe has just corrupted (broken). – Chen Stats Yu Dec 29 '14 at 23:08
  • Can you post an example of a simple PDF that you cannot import even after restarting Mathematica? – Szabolcs Dec 29 '14 at 23:09
  • @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? – Chen Stats Yu Dec 29 '14 at 23:10
  • @Szabolcs Your command does work fine and produced a circle. But it does not read (import) PDF files, does it? – Chen Stats Yu Dec 29 '14 at 23:12
  • To be honest, I am not convinced that anything is broken on your machine or that a reinstall would change anything. This is why I am asking you to post an example PDF that won't import. It is possible that Mathematica just won't handle the PDF files you tried. For example, have you tried exporting a PDF to disk from within Mathematica and re-importing it? Start with that circle. – Szabolcs Dec 29 '14 at 23:17
  • @Szabolcs You were right! So I changed my question. – Chen Stats Yu Dec 29 '14 at 23:28
  • just ran into this myself, solution use acrobat pro to save as compatible with acrobat 5x (pdf v1.4). – george2079 Aug 26 '16 at 18:33

1 Answers1

3

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).

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
  • 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. http://mathematica.stackexchange.com/questions/69287/export-to-pdf-file-and-use-in-latex-weird-behaviour-from-using-acrobat – Chen Stats Yu Dec 29 '14 at 23:46
  • I should clarify, the related problem was that Acrobat can not correctly process the PDF files produced by MMA 10.0.1 X64 (Win7). – Chen Stats Yu Dec 29 '14 at 23:49
  • 1
    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. – Szabolcs Dec 30 '14 at 00:12
  • 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! – Chen Stats Yu Dec 30 '14 at 00:22