I'm an in-house developer for a print company.
We use Adobe Indesign CS3 and CS5 to create documents for printing.
I created a script in Adobe Extendscript that creates an Indesign Document and handles some basic conversions when the client fails to do so themselves.
I used Javascript to write this script.
Is it possible to call a web service through such a script?
If so, how?
If not, what would be the best way to call a web service from the desktop?
Thank you.
To run the script, open a document in InDesign, then open the Scripts panel (see above) and double-click the script name. Some scripts require you make a selection first before you run them, because they act on the selection. See if the script writer provided any sort of documentation if you can't figure it out.
InDesign is the best choice to design and publish multipage documents containing text, vector artwork, and images. Use precise grids and guides to position page elements and create polished layouts. Take advantage of professional typesetting features to format text consistently across pages, chapters, and publications.
As of 2022 I would point to
Extendables was already mentioned (does not exist anymore):
Extendables
It is not jQuery, instead it is a library for InDesign Scripting.
The most complete discussion is found at Rorohiko's blog, with an nice straight forward example.
No and Yes.
No, there is no way (afaik) to make InDesign call a web service from a script. It's very possible and often done from InDesign plugins (you can execute arbitrary c++ code so you can do whatever). However, that's an entirely different beast to learn.
Yes, it's possible to do from ExtendScript using a library. So basically your script would call the web service to get data (maybe using parameters gotten from InDesign or the document) and then send the returned values into other InDesign script functions to perform the operations.
A basic sample can be found here that uses 'Extendables'.
EDIT: Since there seem to be some confusion: The documents aren't the ones running the script and very rarely even contain them. The scripts are saved in an InDesign specific Javascript format (.jsx) and interpreted by the InDesign scripting engine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With