Saving .pdf files works in Matlab Appdesigner, but not as a standalone app
조회 수: 3 (최근 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!