title: PDF output from MATLAB and inclusion in LaTeX
body: <p>I'm printing some figures in MATLAB in PDF form, and can view them fine with the Evince PDF viewer on Fedora 16. </p>
  
  <p>When I try to include them in LaTeX (TeXLive 2011), however, I get an error</p>
  
  <pre><code>!pdfTeX error: /usr/local/texlive/2011/bin/x86_64-linux/pdflatex (file ./caroti
  d_amp_mod_log.pdf): xpdf: reading PDF image failed
  </code></pre>
  
  <p>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.</p>
  
  <p>Might it have something to do with the <code>set(0,'defaultfigurepaperpositionmode','auto')</code>I put in my <code>startup.m</code> file so that pages would auto-fit the images?</p>
  
  <p><strong>EDIT:</strong> I just tried using <code>saveas(figure(1), 'filename.pdf')</code> instead of <code>print(figure(1), 'filename.pdf')</code> and it worked fine, but the <code>PaperPositionMode</code> property is ignored. Any way around this?</p>