When I save a figure as a postscript or pdf the figure is saved as a collection of images rather than the individual objects. I recently upgraded my Matlab from 2010a to 2016a and do not have this problem using the 2010a version. Please advise!
11 views (last 30 days)
Show older comments
When I save a figure as a postscript or pdf the figure is saved as a collection of images rather than the individual objects. I recently upgraded my Matlab from 2010a to 2016a and do not have this problem using the 2010a version. Please advise how to fix this in my script!
0 Comments
Answers (1)
Richard Quist
on 23 May 2016
If MATLAB thinks the figure is too complicated it will produce an embedded image in the output file, rather than vectorized (editable) content. You can force MATLAB to produce vectorized output by using the -painters option when calling the print command, as in:
print -painters -dpsc output.ps
or
print -painters -dpdf output.pdf
The output files will then contain vectorized content instead of embedded images.
See the Vector Graphics File discussion in the description of the formattype input argument in the documentation of the print command for more details.
2 Comments
Pablo Blazquez
on 15 Sep 2020
Thanks a lot Richard. It also worked for me! Can you append several pages in a single pdf file using "print -painters"?
Thanks
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!