How do you open PDF file in MATLAB on a Linux platform?

I ported MATLAB code from Windows 7 to CentOS Linux. The "open(<pdf file path name>);" statement that works fine on a Windows platform didn't work on the Linux platform. I can double click on the PDF file in the CentOS File Browser and it immediately open in a PDF reader. The path is correct and there is no exception thrown. I gave it a bad file name and got a file not found exception.

댓글 수: 1

If anybody is interested, the MATLAB open doesn't appear to support PDF files in Linux. I ended up using the CentOS Linux command "evince". Other flavors of Linux may have another command to open PDF files.
if isunix
system(['evince ' help_file_name ' &']);
elseif ispc
open(help_file_name);
else
msgbox(['Open ' help_file_name 'in the operating system'],'Product Help');
end

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

 채택된 답변

Wendy Fullam
Wendy Fullam 2015년 6월 9일
David answered above: If anybody is interested, the MATLAB open doesn't appear to support PDF files in Linux. I ended up using the CentOS Linux command "evince". Other flavors of Linux may have another command to open PDF files.
if isunix
system(['evince ' help_file_name ' &']);
elseif ispc
open(help_file_name);
else
msgbox(['Open ' help_file_name 'in the operating system'],'Product Help');
end

추가 답변 (0개)

카테고리

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

제품

태그

질문:

2015년 2월 11일

답변:

2015년 6월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by