for my Plugin I need to remove artobjects from the document before saving and add them again after saving.
I used the kAIDocumentWritePreprocessNotifier which worked perfect for all *.ai files.
BUT with *.pdf it doesn't work. Opening the pdf afterwards again in AI the Objects are not there - as expected - opening in Acrobat the objects are there.
This means that the DocumentWritePreprocess lasts until the AI part of the pdf is saved and when saving the pdf part of the pdf the objects are in the document again.
Notifie all the different Save commands is also not usefull, cause when saving a new document or saving as and then pressing cancel all the object which should be removed are gone - of course.
Has anybody an idea how to solve this? Or how to catch the cancel event? Or is there any beforeExportToPdf notifier?
Perhaps using kAISaveCommandPreNotifierStr can work for you? That seems to get invoked for both pdf and ai files
Peter, thanks for the answer!
At the moment I am using all these *CommandPreNotifiers in combination with the *PostNotifiers but unfortunately there is no Notifiers for a possible cancel event. So if I do a SaveAs for example and then cancel the progress my document is edited. These edits are undone after the save with the postNotifiers but they don't notifie when cancelled.