how to convert generated model advisor check report which is in html file into PDF format using m script? I am using MATLAB 2020a version

I did model advisor checks and generated reports. Generated reports are in html format by default. I need to convert html file into PDF.

Answers (1)

  • You can use "ModelAdvisor.run()" for generating report.
  • For the Windows operating system, the supported formats are 'pdf', 'html', and 'word'. For UNIX like operating systems, the only supported format is 'html'.
  • For generating report in "pdf" format in Windows, use Name-value argument "ReportFormat" as "pdf" as shown below.
ModelAdvisor.run(model, checkIDs,'ReportFormat', 'docx', 'ReportPath', pwd, 'ReportName', 'myReport');

3 Comments

Even though I used above command, I am getting below error. Kindly help me out in this.
I assigned checkIDs as well.
I tried with Report format as 'PDF'.
will the 2020a version support this ?
error:
Error using ModelAdvisor/run>parseArgs
The specified input arguments are not valid.
Error in ModelAdvisor/run
Error in codegen_modeladvisor (line 116)
ModelAdvisor.run(Model, checkIDs,'ReportFormat', 'pdf', 'ReportPath', pwd, 'ReportName', 'myReport'); - Show complete
stack trace
@Vishesh this documentation is for MATLAB R2022a and he asked for MATLAB R2020a.I am also want a solution to generate pdf report at MATLAB R2020b.

Sign in to comment.

Categories

Asked:

on 24 Nov 2022

Edited:

on 8 May 2023

Community Treasure Hunt

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

Start Hunting!