Copy link to clipboard
Copied
Hi friends -
I've been looking around the net to see if this was possible but have come up empty so far.
With the amount of iD files I work with across teams, it would be really beneficial if there was a way to warn our users if there are missing links or font errors when they are closing a file. That way we can adjust these errors prior to saving and exiting. I know this check happens on the front end when opening a file but sometimes we have links adjusted while we are working in the file.
I know preflighting could help and notify in the bottom status bar, but it can be easy to miss. If we had a way for a module to popup on close if there was an error, it could prevent some back and forth for us.
Any thoughts?
Thanks ![]()
I’m not that fluent in JS, but I think this should work. If you need something more complex ask in the scripting forum.
...#targetengine "closeConfirmation"
app.addEventListener("beforeClose", confirmClose);
function confirmClose(e) {
if(e.parent.constructor.name !== "LayoutWindow") return;
var d = app.documents[0];
var lnks = d.allGraphics;
for(i = 0; i < lnks.length; i++){
if(lnks.itemLink.status != LinkStatus.NORMAL){
if (confirm ("The document you are about to clos
Copy link to clipboard
Copied
Preflight is a great choice. A custom Preflight would be even better. Here's a video about Preflight that could help.
http://www.jeffwitchel.net/2012/08/finding-potential-printing-problems-automatically/
If the biggest thing you're concerned about is missing links and fonts, make sure your entire team is ALWAYS working from Packaged files (File > Package). That way no one should ever be missing links or fonts when they open a layout on a different computer.
Copy link to clipboard
Copied
As Jeff mention, there is preflight in InDesign, as you know. This is great for many cases. That said, many also opt for the stand-alone option of FlightCheck. Like this book/advertising customer:
FlightCheck user review from Terri Wright, preflight for prepress for book printing - YouTube
The point is with FlightCheck, is that it often goes deeper, especially with embedded elements within placed EPS, AI or PDF files.Watch: InDesign vs FlightCheck - Round 1 - Placed PDF Problems - YouTube
And it checks many file formats other than just InDesign.
Friendly Regards,
David Dilling
Markzware(Makers of FlightCheck)
Copy link to clipboard
Copied
If all you are trying to do is check for link status and not a full preflight, it could be done via a startup script that listens for a quit. So this ApplsScript (OSX only), would check the link status and display a dialog if the status of all the links isn't normal. ID would still quit after the dialog is displayed, and I’m not sure if there is a way to stop the quit after the dialog is dismissed. It also only checks the front document, but it would be possible to check all open docs.
If you are using OSX paste this into Apple Script Editor and save it into your /Applications/Adobe InDesign CC 20xx/Scripts/startup scripts folder
tell application "Adobe InDesign CC 2018"
make event listener with properties {event type:"beforeQuit", handler:checkLinks}
end tell
on checkLinks()
tell application "Adobe InDesign CC 2018"
try
set lnks to every link of active document whose status is not normal
if (count of lnks) is greater than 0 then
display dialog "The Active Document Has " & (count of lnks) & " Modified or Missing Links"
end if
end try
end tell
end checkLinks
Copy link to clipboard
Copied
There's also a before close event, so you could check when the doc is closed rather than on a quit:
tell application "Adobe InDesign CC 2018"
make event listener with properties {event type:"beforeClose", handler:checkLinks}
end tell
on checkLinks()
tell application "Adobe InDesign CC 2018"
try
set lnks to every link of active document whose status is not normal
if (count of lnks) is greater than 0 then
display dialog "The Active Document Has " & (count of lnks) & " Modified or Missing Links"
end if
end try
end tell
end checkLinks
Copy link to clipboard
Copied
Thanks Rob! This is ideally what I was looking for rather than doing full preflight. I do work out of Windows so I am guessing I'll need to find a similar JS version to make this work correct?
Copy link to clipboard
Copied
I’m not that fluent in JS, but I think this should work. If you need something more complex ask in the scripting forum.
#targetengine "closeConfirmation"
app.addEventListener("beforeClose", confirmClose);
function confirmClose(e) {
if(e.parent.constructor.name !== "LayoutWindow") return;
var d = app.documents[0];
var lnks = d.allGraphics;
for(i = 0; i < lnks.length; i++){
if(lnks.itemLink.status != LinkStatus.NORMAL){
if (confirm ("The document you are about to close has modified links. Click Yes if you would like to close this document.") === false) {
e.stopPropagation();
e.preventDefault();
}
return
}
}
}
Copy link to clipboard
Copied
This is perfect, thank you Rob!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more