Hi'
Switch - Indesign configurator.
Have an Indesign file that should open > update links > Export as .pdf.
The update links, i can't get to work.
First i tried the »re-link all graphics« option in the configurator. - Not working.
Then i tried to use a Javascript, that works in Indesign. - The script returns with error:
Apple script execution has encountered an error: ERROR: No documents are open./::/STATUS=error
Script returned error: ERROR: No documents are open.
Think this should be a simple action, hmmm...
WARNING - I'am not a »Scripting-guy«
Thanx'
Indesign - Update links
Re: Indesign - Update links
Scripts that work in Indesign will not work in the Switch context without modification.
Javascripts for applications have to follow a couple of rules that you can find in the documentation here: https://www.enfocus.com/manuals/UserGui ... tions.html. The changes are usually small.
I guess you are submitting a single Indesign file and not a package, right?
Javascripts for applications have to follow a couple of rules that you can find in the documentation here: https://www.enfocus.com/manuals/UserGui ... tions.html. The changes are usually small.
I guess you are submitting a single Indesign file and not a package, right?
Re: Indesign - Update links
Okay' i see' - and yes, it's a single Indesign file.
The script i have downloadet from kasyan.ho.ua, is:
Will this be easy to adjust?
Do i need the Error handling, or can i »just« give the variables a new name?
Thanx!
The script i have downloadet from kasyan.ho.ua, is:
Code: Select all
if(app.documents.length == 0){
alert({en: "No documents are open. Please open a document and try again.", ru: "Не открыт ни один документ, откройте файл и попробуйте снова."});
exit();
}
else {
var myDoc = app.activeDocument;
updateLinks();
}
function updateLinks(){
for(var myCounter = myDoc.links.length-1; myCounter >= 0; myCounter--){
var myLink = myDoc.links[myCounter];
if (myLink.status == LinkStatus.LINK_OUT_OF_DATE){
myLink.update();
}
}
}
Do i need the Error handling, or can i »just« give the variables a new name?
Thanx!
Re: Indesign - Update links
Maybe someone have an example-script i can see - to help me adjust the script?
Re: Indesign - Update links
If the update link doesn't work in the Configurator it is usually because the path to the links in the InDesign document isn't found by Switch.
If you are getting the files from a customer the path in the document points to the customers server which Switch doesn't have any connection to.
Best way to solve this is if the customer saves the InDesign document as a package with the links saved in the package folder. If you then enters this package folder to Switch the links will update since Switch knows where the links are in relation to the InDesign document.
Have you tried this?
If you are getting the files from a customer the path in the document points to the customers server which Switch doesn't have any connection to.
Best way to solve this is if the customer saves the InDesign document as a package with the links saved in the package folder. If you then enters this package folder to Switch the links will update since Switch knows where the links are in relation to the InDesign document.
Have you tried this?
Re: Indesign - Update links
Thanks for reply!
In this case, it's one indesign file located on the server with one .pdf link located on the server.
The .pdf it getting replaced in the same location/path.
If i open the document on the server > update - it will update whitout problems.
In this case, it's one indesign file located on the server with one .pdf link located on the server.
The .pdf it getting replaced in the same location/path.
If i open the document on the server > update - it will update whitout problems.
Re: Indesign - Update links
And Switch has access to that server?
What does the logs (Messages button) say, have you activated Debug in the preferences under "Logging"?
You should then see some messages telling you what goes wrong with the updating of links.
What does the logs (Messages button) say, have you activated Debug in the preferences under "Logging"?
You should then see some messages telling you what goes wrong with the updating of links.
Re: Indesign - Update links
There is a fundamental problem in the setup because the Indesign file in Switch is not next to the PDF file so even with a modified script it would not work just like that.
You could modify the script so it goes out to look for missing links in some location. That is the most difficult approach.
You could submit the Indesign file and the PDF into a flow, either already in one folder or you assemble them into a folder. When you then update the links it will probably work. The script that you found online of course does not work in Switch. Without having tested it, I would say it has to look like this:
Or you could submit the Indesign file, inject the PDF into the flow with e.g. the Inject wildcard app, assemble both into a folder and run the same script as above.
You could modify the script so it goes out to look for missing links in some location. That is the most difficult approach.
You could submit the Indesign file and the PDF into a flow, either already in one folder or you assemble them into a folder. When you then update the links it will probably work. The script that you found online of course does not work in Switch. Without having tested it, I would say it has to look like this:
Code: Select all
for(var myCounter = $doc.links.length-1; myCounter >= 0; myCounter--){
var myLink = $doc.links[myCounter];
if (myLink.status == LinkStatus.LINK_OUT_OF_DATE){
myLink.update();
}
}
Re: Indesign - Update links
@freddyyp - The script works Simple, and perfect for my setup....
Have a nice day
Have a nice day