CoInitializeEx(nil,COINIT_MULTITHREADED); und CoUninitialize; innerhalb des Task/Threadkontextes aufrufen?
Delphi-Quellcode:
function TPrintBase.MakeExportPDF(FilePath, FileName: string):TProc;
begin
Result :=
procedure
begin
CoInitializeEx(nil,COINIT_MULTITHREADED);
ExportPDF(FilePath, FileName); // Archiv
CoUninitialize;
end)
end;
...
TTask.Run(MakeExportPDF(Print.PDF.FilePath, Print.PDF.FileName)); // FilePath und FileName sofort auflösen