I'm printing some figures in MATLAB in PDF form, and can view them fine with the Evince PDF viewer on Fedora 16.
When I try to include them in LaTeX (TeXLive 2011), however, I get an error
!pdfTeX error: /usr/local/texlive/2011/bin/x86_64-linux/pdflatex (file ./caroti
d_amp_mod_log.pdf): xpdf: reading PDF image failed
However, I can take an example PDF image generated in Mathematica and include it just fine, which tells me that the problem is with the PDF's generated by MATLAB and not with PDF's in general.
Might it have something to do with the set(0,'defaultfigurepaperpositionmode','auto')
I put in my startup.m
file so that pages would auto-fit the images?
EDIT: I just tried using saveas(figure(1), 'filename.pdf')
instead of print(figure(1), 'filename.pdf')
and it worked fine, but the PaperPositionMode
property is ignored. Any way around this?