How to close Illustrator when export is finished?
Hello,
I am exporting a file as an SVG to a network share location.
After calling the exportFile and close function, if I add app.quit(), the file is not completely exported and has a file size of 0;
If I omit this line, everything works fine.
How do I check that the file has comlpetely finished exporting, and then close Adobe Illustrator?
The sizes vary, so a constant timeout value likely would not work.
Below are the relevant lines in the code:
sourceDoc.exportFile(targetFile, ExportType.WOSVG, options);
sourceDoc.close(SaveOptions.DONOTSAVECHANGES);
app.quit(); // causes the file to have 0 file size.