Print HTML to PDF from Webview

조회 수: 19 (최근 30일)
Fabien Massé
Fabien Massé 2022년 10월 3일
답변: Vijay 2022년 10월 14일
Hi,
I have a .html file running some JavaScript, and I need to export it as a .pdf. So far :
1) I manage to get a view from the Matlab built-in webviewer with : [STAT, BROWSER, URL] = web('index.html')
2) I exported the page in pdf using the "print" icon of the WebView. This is exactly what I need, unless I need to this programmatically. The BROWSER object is a WebPage object, and seems to have several interresting methods (such as "print"), but I can not find any documentation for this.
Anyone has an idea ? I am also open to any other possibility for exporting the pdf from my html. I've also tried the report generator and wkhtmltopdf, but without any success (because of the javascript part I guess).
Thanks !

답변 (1개)

Vijay
Vijay 2022년 10월 14일
This question has already been asked.
Refer to the following MATLAB Answers link for the same query

카테고리

Help CenterFile Exchange에서 Create Model Web Views에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by