InDesign server
To download a trial version visit the Adobe InDesign CC Server Trial Downloads Program page.
Basically, InDesign Server's object model is the same as that of Desktop, with two exceptions:
- Because Server has no interface, you can't use anything that refers to the interface: activeWindow, activePage, etc. There's also no way to communicate directly with the user: no prompt(), alert(), or any other dialogs.
- Methods that can use the interface are different by one argument. e.g., export to PDF in the Desttop version has an option that enables you to show the PDF export dialog, but (naturally) in Server that option isn't available.
What’s different between the Desktop and Server versions
To write a line to the console, use app.consoleout or consoleerr (for errors) method instead of $.writeln:
if (app.name == "Adobe InDesign") { $.writeln("gradientFillAngle = " + rec.gradientFillAngle); } else { app.consoleout("gradientFillAngle = " + rec.gradientFillAngle); }
exportFile() method has withGrids the 4-th parameter-- If true, exports the grids -- and has no showingOptions (3-rd parameter in the desktop version).
Features missing in Server
You can find out what is different by comparing two scripting references: for Desktop and Server.
- User interface elements like dialog boxes, alerts, confirms, etc.
- Selections (obviously, you can’t select anything in ‘headless’ InDesign)
- scriptPreferences.userInteractionLevel (I guess, but can’t test it at the moment, that IDS ignores warnings like missing fonts, and images)
Example of making gradient by script in InDesign server by Kasyan
InDesign Server Tasking by Kris Coppieters