Display gets cut off when exporting Live Script to PDF
96 views (last 30 days)
Show older comments
MathWorks Support Team
on 22 Oct 2019
Edited: MathWorks Support Team
on 22 Oct 2019
I am working with and displaying rather large matrices in the Live Editor, then exporting this display to a PDF file. However, when exporting to a PDF, the matrices are so large that the display does not fit on the page and gets cut off on the right side of the screen.
Accepted Answer
MathWorks Support Team
on 22 Oct 2019
Edited: MathWorks Support Team
on 22 Oct 2019
The goal here is to resize the exported document to fit the entire display. Here are three ways to achieve this:
1. Use MATLAB's Report Generator. See examples in the documentation:
<https://www.mathworks.com/help/rptgen/index.html?s_tid=CRUX_lftnav>
2. Instead of exporting your Live Script as a PDF, export it as an HTML file, and open it up in Google Chrome. Then, click CTRL+P to open the print options for the HTML document. Change the "Destination" to "Save as PDF". Finally, click the drop-down arrow for "More Settings" and change the "Scale" to "Custom". Decrease the scale until the entire display fits on the page.
3. Export your script as a Latex document. Within this document, use the "resizebox" command ("\resizebox{1.0\textwidth}{}") from the "graphicx" package ("\usepackage{graphicx}") to rescale the document and fit everything withing the page margins. You will also have to delete the "\begin{matlabsymbolicoutput}" and "\end{matlabsymbolicoutput}" commands in order for this method to work.
0 Comments
More Answers (0)
See Also
Categories
Find more on Adding custom doc 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!