Clear Filters
Clear Filters

Every single time I want to publish to PDF in any one of my scripts I get this error: "Loading remote resource not allowed"

1,005 views (last 30 days)
This is the error in the command window:
Loading remote resource not allowed. Remote resource: http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
This error happened around the time I copy and pasted code from Sublime. I have engineering finals coming up so I would appreciate any help. Also this is an error for every single script I try to publish to PDF in Matlab online.
EDIT: My work around is not using MATLAB Online. I tried inserting code from IT as a work around and it doesn't work. The IT person told me it is a bug within the online version. I recomend real MATLAB 2024a.
  4 Comments
Ornit
Ornit on 25 Apr 2024
Edited: Ornit on 25 Apr 2024
Same problem, noted after migrating to the official R2024a earlier this week.
Suggested workwround by Evin (below) does not work - it generates "Unable to check out a Report Generator license. Reason: MATLAB Report Generator is not installed...."

Sign in to comment.

Answers (1)

Evin
Evin on 16 Apr 2024
(The solution to this problem came from somone in tech support)
After some investigation, the error you are seeing is actually caused by a bug within MATLAB. I apologize for any trouble this has caused you. Our development teams are aware of this issue, and they might consider carrying out a fix in one of our future MATLAB releases. If this issue does get fixed, you shall receive an automated notification email by then.
In the meantime, you can use the "mlreportgen.report.MATLABCode" class as a workaround that should allow you to achieve a similar outcome to publishing your scripts to PDF. Below is an example function that demonstrates how to use this class to create a PDF report from your MATLAB code:
function publishWithRptgen(fileName)
import mlreportgen.report.*
% Get name of file for report
[~,name,~] = fileparts(fileName);
% Make a report and add a code reporter
rpt = Report(name,"pdf");
codeReporter = MATLABCode(fileName);
append(rpt, codeReporter);
% Close the report
close(rpt);
end
To use this workaround, you can either include this function in your scripts or create a separate function script. When you wish to publish a script as a PDF, simply call this function in a new file or directly in the MATLAB Command Window, passing the name of the script you wish to publish as an argument:
>> publishWithRptgen("<file_name>") % Please replace "<file_name>" with the name of your script file.
  3 Comments
Evin
Evin on 24 Apr 2024
@Oliver, sorry to hear that, I didnt end up using this work around. I swiched to real MATLAB 2024a (not online) and it works fine, but no dark mode :/

Sign in to comment.

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!