exportgraphics with ContentType vector does not work properly
Show older comments
I am trying to export a large figure as a PDF, through
exportgraphics(h,'Figure.pdf','ContentType','vector')
Matlab creates a file called "Figure.pdf" in the designated folder but:
- If you try to open that pdf file, an error window comes out: "An error occurred while opening this document. The file is corrupted and cannot be repaired".
- At the same time, Matlab keeps running the same code, and you cannot either pause it or stop it, unless you force the computer to stop Matlab.
So far I can only see
exportgraphics(h,'Figure.pdf','ContentType','image')
as possible alternative to export my figure, even though, to the best of my undestaing, this is not a vector-type image.
Are there some alternative to still get a vector image in my case?
Accepted Answer
More Answers (0)
Categories
Find more on Printing and Saving 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!