Error using Matlab's publish function to create a pdf

136 visualizaciones (últimos 30 días)
Radford
Radford el 29 de En. de 2025
Respondida: Taehon el 15 de Abr. de 2025
On 3 of my students' laptops that have Matlab installed, regardless of whether I use the publish function in the Command Window, or the publish tab at the top, I cannot get Matlab to generate a pdf. It gives me the same error on all 3 laptops:
Error using mlreportgen.re.internal.xml.transform.CompiledStylesheet
All of my other students are not having this issue on their computers. I have tried seeing if this has been asked before or other people have had this error but I am not finding anything on the mathworks website. I have taught this class for years and have never seen this error using the publish function before.
  10 comentarios
John
John el 3 de Feb. de 2025
I am having the same issue with my own computer.

Iniciar sesión para comentar.

Respuesta aceptada

Paul Kinnucan
Paul Kinnucan el 7 de Abr. de 2025
This issue was caused by a security update to a third-party library used by publish in R2024a_update6 and R2024b_update4. The issue is fixed in R2024a_update7 and R2024b_update5.

Más respuestas (6)

Sivsankar
Sivsankar el 11 de Feb. de 2025
I encountered the same issue when attempting to export a MATLAB file as a PDF in Update 4 of MATLAB R2024b. However, when I reverted back to Update 3, the process worked without any errors. Additionally, it also worked when using MATLAB Online. I suggest trying these options to see if they resolve the issue for you
Thanks.

AFWAN
AFWAN el 3 de Feb. de 2025
The error you're experiencing with MATLAB seems to be related to issues with rendering PDFs using the publish function. Probably MATLAB Version Conflict, ensure that the MATLAB version used by your students is compatible with the publish feature.
  1 comentario
Linda
Linda el 3 de Feb. de 2025
These are brand new installs. Others in the class did the same download and did not get this issue. Where would they get different publish feature versions?

Iniciar sesión para comentar.


Steven Lord
Steven Lord el 3 de Feb. de 2025
I tried searching our internal bug database but I didn't find anything that looked exactly like this issue. I've reached out to the developers responsible for the publishing feature. They recommend that anyone who has encountered this issue contact Technical Support directly using this link and work with them to investigate the issue so they can determine the cause and provide a workaround and/or a fix.
  2 comentarios
Anton
Anton el 9 de Feb. de 2025
This appears to be the second time publishing to PDF was broken in the last year or so. Why does this keep happening?
Christopher Stapels
Christopher Stapels el 25 de Feb. de 2025
We hear your concern, and apologize for the issue. I'm sure it is frustrating to have the function stop working. I was not able to reproduce the issue, so i is possible our testing environment may not be covering all possible hardware setups. Your help reporting the issue will allow us to improve coverage for testing.

Iniciar sesión para comentar.


Carson
Carson el 3 de Feb. de 2025
I ran into the same error. I was able to export as html > click the print button > save as pdf.

Swapnil
Swapnil el 3 de Feb. de 2025
Hey, I'm experiencing the same issue. I found a fix. Under the publish button there is a dropdown, click that. That should pop open a menu, click "Edit Publishing Options...". Next I changed my output from "html" to "doc". That saved my work to word doc, from word doc I was able to save it to a pdf.
To sum this up I changed my publish output from html to doc, then saved it as a pdf from Microsoft Word.
Hope this helps!

Taehon
Taehon el 15 de Abr. de 2025
I solve this problem by updating my R2024b_update4 to 5.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by