How can I open a PDF in a compiled application?
32 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2019 年 11 月 1 日
編集済み: MathWorks Support Team
2022 年 11 月 17 日
I am building an application where the GUI contains a help button to open a PDF file which some instructions. The GUI is made in Windows and it is only intended to be used in Windows machines.
For this, my code contains the following line:
>> open('USER_MANUAL.pdf')
However, the application compiler does not attach the PDF in the compiled app and 'open' does not work.
How can I add the PDF such that it is automatically compiled with the app?
採用された回答
MathWorks Support Team
2022 年 11 月 17 日
編集済み: MathWorks Support Team
2022 年 11 月 17 日
To achieve this, please do the following:
1. Replace 'open' with 'winopen', since the function 'open' does not work in standalone mode:
>> winopen('USER_MANUAL.pdf')
This command will work in the compiled app as long as the PDF file is present in the installation folder.
2. Add the PDF into the application. To do this, you need to manually add it into the field 'Files installed for your end user' within the Application Compiler. This will add your PDF file such that it is automatically installed with the App.
3. Finally, you also need to add the file into 'Files required for your end user', if MATLAB does not automatically do that for you.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Adding custom doc についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!