Printing .m to pdf on Linux

Hi there, does anyone know a way to print a .m file to pdf on linux?
On Ubuntu 19.10 with R2019B, selecting print just returns an error for no conigured printers. I don't have any physical printers, but I expected at least an option to print to PDF like other applications have. This doesn't seem to be something I can edit in printopt.m, but perhaps I'm wrong about that? I tried adding a system print to pdf in the GNOME printer settings to no avail as well.
Any tips?
~Ave

댓글 수: 2

Ave
Ave 2019년 11월 5일
This does exactly what I want, and more! Thanks!

댓글을 달려면 로그인하십시오.

답변 (1개)

Daniel M
Daniel M 2019년 11월 5일
편집: Daniel M 2019년 11월 5일

0 개 추천

publish('myscript.m','pdf');
It will publish any figure or anything that prints to the command line as well.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2019b

태그

질문:

Ave
2019년 11월 5일

편집:

2019년 11월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by