Saving .pdf files works in Matlab Appdesigner, but not as a standalone app

4 visualizaciones (últimos 30 días)
I created a matlab function that creates a .pdf document at a certain filepath which I get through the function uiputfile. If I try the code in my application in the appdesigner, everything works just fine. But if I export the app as a standalone .exe file, nothing happens.
Here is the relevant part of the code:
filter = {'*.pdf'};
[file, path] = uiputfile(filter,'Bitte wählen Sie einen Speicherort aus',Name);
if(path == 0)
return;
end
file = erase(file, '.pdf');
if (isempty(AESZeiten)~=1 || isempty(VESZeiten)~=1)
Titel = ['Auflistung der Befunde im EKG-Signal' ' "' Dateiname '":' newline newline];
Test = [newline];
rpt = Document(fullfile(path,file),'pdf');
open(rpt);
append(rpt, Titel);
append(rpt,Test);
table = FormalTable({'Minuten', 'Befund';rptMatrix(:,1),rptMatrix(:,2)});
append(rpt, table);
close(rpt);
I think it could be some sort of writing rights error, because the file does not show up in the desired location but it does show up in the "fast acess" (dont really know how it is called in english) section of my windows explorer. If I try to click on it there it just says that an error occured while openening this file and it cant be found.
I would really appreciate some help, thank you.
  1 comentario
Moein Siadaty
Moein Siadaty el 6 de En. de 2025
Do you solve your problem? I have the same problem. at the app designer the .pdf report generation works well. but in the compiled app,the generated .pdf file size is zro kB

Iniciar sesión para comentar.

Respuestas (1)

JOSE NICOLAS GONZALEZ GUATIBONZA
JOSE NICOLAS GONZALEZ GUATIBONZA el 17 de Mayo de 2020
Hello,
Just put the line makeDOMCompilable(); at the beginning of the callback who invokes the report generator.

Categorías

Más información sobre MATLAB Report Generator en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by