Is it possible to embed and view PDFs or Word Documents in a GUI, either created using GUIDE or otherwise?

22 ビュー (過去 30 日間)
I have a GUIDE-created GUI that I would like to display results, which are in Word Document form, directly inside the GUI. Is this possible in R2017b?

採用された回答

Walter Roberson
Walter Roberson 2018 年 6 月 5 日
One option is to open a web browser to display the file:
If I understand correctly this would have to be a separate window.
On Windows, another option would be to use Activex to talk to Word to tell it to display the document. I think this would need to be a different window.
A third approach is to arrange to have the document print to image and read the image and display it. This could be part of a window but it would not have any controls that you would normally see in a viewer.
Finally, there is the possibility that that you might be able to do this by calling on Java. Uipanel should create a Java canvas I think, and you could potentially tell an appropriate Java routine to render into that canvas. I would recommend looking at undocumentedmatlab.com for more about the lower level interface to Java.
  1 件のコメント
Terence Ng
Terence Ng 2018 年 6 月 9 日
Thanks for the advice Walter. I'll start looking through and hopefully it'll be what I'm thinking.
I'll just go with opening up a separate window if the result doesn't turn out the way I was envisioning it.

サインインしてコメントする。

その他の回答 (1 件)

Eddy Fry
Eddy Fry 2023 年 1 月 19 日
I have just tried displaying a PDF file with a uihtml panel in a uifigure and it displayed nicely.
The app code to point to the pdf file looks like this:
app.HTML.HTMLSource = 'my_pdf_file.pdf';
The normal PDF zoom controls work, which is a bonus.
Hope this helps.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by