SAVE2PDF saves a figure as a PDF as it appears on the screen. SAVE2PDF is stand-alone and simple--it does not require a separate installation of ghostscript. It saves figures as they appear on the screen, with the correct page size. It has the option to change the resolution to be print-quality.
SAVE2PDF is particularly useful for LaTex users who want to generate PDFs to include when compiling with pdftex. The vector art information is preserved.
This function simply augments the built in print-to-pdf functionality of Matlab by resizing the output PDF and shifting the displayed plot.
Great function, provided perfect solution first time around!
Many thanks
20 Oct 2008
Richard Stephens
Excellent. Just what I was looking for.
30 Aug 2008
A S
Works good and helps a lot with mass-pdf-graph-generation ... pdf2ps in linux doesn't generate vectorized .ps from these pdfs, but that's not Gabe's fault.
15 Feb 2008
Tim Woolmer
Great stuff - just what I needed. Thanks!
14 Feb 2008
Nathan Miller
Works great and I don't have to manually crop the pdfs.
The only problem I have is that the legend output is different whether you use the command line 'print' or select "save as" from the figure menu. Using 'print', the legend background color is lost and the black outline shows up even when set to white. However, this is a matlab bug, not this code's problem.
05 Sep 2007
Dan Kominsky
Nice and does what it says. But what I'm really interested in is how to save multiple figures to a multi-page pdf without ghostscript. Any thoughts?
Updates
24 Sep 2007
Added "Save As" dialog box, so that file name can be omitted in the function call, and ability to change the resolution of the output. Default resolution would be 150 dpi, but typical print-quality should be around 600 dpi.