Adjust PDF page

版本 1.0.0.0 (1.9 KB) 作者: Cris Luengo
MATLAB writes figures to PDF files as a full page. This function corrects that.
571.0 次下载
更新时间 2012/2/24

查看许可证

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.

引用格式

Cris Luengo (2024). Adjust PDF page (https://www.mathworks.com/matlabcentral/fileexchange/35264-adjust-pdf-page), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2011b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0