Saving .pdf files works in Matlab Appdesigner, but not as a standalone app
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
Moein Siadaty
2025-1-6
Dear @Lennart Henkenhe
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
回答(1 个)
JOSE NICOLAS GONZALEZ GUATIBONZA
2020-5-17
Hello,
Just put the line makeDOMCompilable(); at the beginning of the callback who invokes the report generator.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Report Generator 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!