I want to do some stuff before the document saves.
I use the Host Adapter with Illustrator
When I register a handler:
the function gets called when saving, but the document is saved before my actions are finished. Can I get Ilustrator to wait till my function has finished?
In my case I want to write some XMP data right before the document is saved. Is this impossible? What the point of this Event if cannot finish your actions before the actual writing of the document is done?
Or to put it different:
How can I do some action before the actual saving of the document is done. How can I update the XMP data before the data is saved?
How can I make the document saving operation wait for my code to finish?
One hack could be just call the document.save() or document.saveAs() again. But when the user choose some specialised options when he saves a pdf, I don't know this options and will write a pdf with default settings.