Is it too late to modify preview thumbnails once beforeSave event fires?
My goal:
I need to show non-printing layers in my .indd files' preview thumbnails. We produce print jobs which will have post processing applied to them (thermography and cutouts glued to the printed cardstock). Our .indd files have layers containing these post production images so that we can determine proper alignment and spacing for the end product.
These are graphics are placed in non-printing layers so that they do not print. However InDesign generates preview thumbnails which do not contain these non-printing images. This is a problem for us because we can not tell the nuanced difference between similar indd files soley by their preview images.
Therefore my goal is to somehow include these non-printing layers in the image preview thumbnail.
What I have done thus far:
I have a startup script which registers for the beforeSave and afterSave events. Before the same it marks all the non-printing layers are printable (printable property = true). Then the afterSave event undoes this by setting those layers back to non-printable. I track which layer was originally non-printing by adding a moniker to the layer's name.
What is not working:
When I run a script that marks the layers as printable, saves then undoes the printable changes everything works perfectly. The preview thumbnail is exactly what I want.
However, when I run it as a startup script registering for the beforeSave/afterSave events this fails:
- Success: The beforeSave does correctly update the printable property then modifies the layer's name. This is as expected and working well.
- Success:The afterSave does correctly reset the printable property and modified the layer's name. This is as expected and working well.
- Failure: The file's preview thumbnail does not reflect the printable=true peroperty of the affected layers.
My Question:
From what I outline above it looks as if the preview image is determined before the beforeSave event fires.
Question 1: Is this true?
Question 2: How can I affect the layers' printable properties once a save occurs?
As a last resort I could intercept any CTRL+S keystroke or the File-->Save menu option and call my original script (as I describe above). I would like to avoid that as it is fragile and less elegant.
Follow question: Can anyone show me what the actual work flows are for these events? For example what does InDesign do during its save function and at what points does it trigger beforeSave and afterSave events?