How to insert image from my computer while report generation using mlreport?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I want to insert image in my report which is saved in my computer. I am unable to do that.
attaching code for reference
import mlreportgen.dom.*
import mlreportgen.report.*
rpt = Report('exampleReport', 'pdf')
im = Image(which('DLRB.png')); % DLRB.png is the image saved in matlab path only where the report will be saved
im.Width = '0.75in';
im.Height = '0.75in';
append(rpt, im);
close(rpt);
rptview(rpt)
2 件のコメント
Srijith Kasaragod
2021 年 11 月 22 日
Hi Srushti,
What is the issue you are facing? In case you are facing any errors, please share what that error is so we could have a better idea on your problem.
回答 (1 件)
yanqi liu
2021 年 12 月 1 日
yes,sir,may be use
import mlreportgen.dom.*
import mlreportgen.report.*
import mlreportgen.dom.*;
rpt = Document('exampleReport','pdf');
table = HTML('<table border="2"><tr><td>yes,sir</td><td>!</td></tr><tr><td>yes,sir2</td><td>!</td></tr></table>');
append(table,'<p>here is a test</p>');
append(rpt,table);
close(rpt);
rptview(rpt.OutputPath);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Images, Figures, Axes, Equations, MATLAB Code, and MATLAB Variables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!