Code covered by the BSD License  

Highlights from
Adjust PDF page

Be the first to rate this file! 19 Downloads (last 30 days) File Size: 1.89 KB File ID: #35264

Adjust PDF page

by

 

MATLAB writes figures to PDF files as a full page. This function corrects that.

| Watch this File

File Information
Description

By default, when writing a figure window to a PDF file, the figure's content is centered on an A4 or letter-sized page. This is not true for any other file format (EPS, TIFF, PNG, etc, where the bounding box of the resulting graphic, very sensibly, matches that of the figure window). This simple function sets the figure's PaperSize and PaperPosition properties so that the PDF file's bounding box matches that of the figure window.

Example:
   <create a nice plot>
   adjustpdfpage
   print -dpdf figure1.pdf

This function was created using Release 2011b, but should work for earlier releases also.

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us