Clear Filters
Clear Filters

Expand a figure in a PDF file

4 views (last 30 days)
Chris on 25 Oct 2022
Answered: Allen on 25 Oct 2022
So I'm trying to export an image into a pdf file then maximise the image so it takes up as much space as possible. I've been using saveas(Image,'Output_Image.pdf'); to export the figure. However the image takes up quite a small space in the pdf file. Is there a way to maximise the image so it takes up as much of the pdf file as possible?

Answers (1)

Allen on 25 Oct 2022
Regular figures have several properties that allow you to control their size when converted to an image, and should work with pdf files too. Not sure if this is valid for UIFigures.
PaperPosition: standard 4-number position vector
PaperOrientation: "portrait" or "landscape"
PaperPositionMode: controls the position of the image on the page. when adjust the above two properties, you may also need to set this to "manual"


Find more on Images in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!