Getting started with InDesign Server

Guru ,
Jan 27, 2022 Jan 27, 2022

Copy link to clipboard

Copied

Dear forum,

I am trying to get myself rapidly acquainted with InDesign Server. I googled for info but couldn’t achieve what I want: to run a few sample scripts provided with Server SDK. Most of the info I found is outdated with links that are broken.

I realize that scripts for server are somewhat different: no Script UI, dialogs, selection, active document / book / script / spread / page, etc.

I read a couple of articles I found very useful for a noob like me: here and here

Here’s where I’ve got so far.

I downloaded the trial version, installed and activated the trial period.

I started an instance of InDesign Server on a SOAP port from Command Prompt

  1. cd "C:\Program Files\Adobe\Adobe InDesign Server 2020\"
  2. InDesignServer -port 12345

And now I have it up and running:

KasyanServetsky_0-1643306307771.png

I navigated to http://localhost:12345/service?wsdl and IS responded to the SOAP request:

KasyanServetsky_6-1643307153242.png

 

Then I go to ESTK and try to run the sample HelloWorld.jsx

But when I’m trying to target Adobe InDesign 2020, I get this message:

KasyanServetsky_1-1643306344452.png

I click Yes. Then this dialog pop-ups forever and nothing happens:

 

KasyanServetsky_2-1643306360752.png

I read about the sample client. Tried to run only the java version (because, as far as I understand, AIR application and Flash Builder aren’t supported anymore).

  1. cd "C:\SDK\sample-client\java\scripts"
  2. sampleclient -host http://localhost:12345 -batch "c:\myJavaScripts\HelloWorld.jsx"

This resulted in an error: Could not find or load main class com.adobe.ids.SampleClient

KasyanServetsky_3-1643306433252.png

When I start IS with ‘InDesignServer’ command (no port), I get this message:

If no configuration name is given, "configuration_portnumber" is used; if no

port number is specified, "configuration_noport" is used. To use the Java API,

an iorfile must be specified. To use SOAP, a port must be specified.

 

Any ideas of what I’m doing wrong? Are there any settings I should set: edit a config file or something? All I want is to make a quick start: just to see how it works and test some scripts.

How is it controlled? There must be a console or something? How scripts are triggered (Obviously, there's no scripts panel folder)?

Is scripting experience enough to automate InDesign Server?

Could someone give me step-by-step instructions to make it work? (I am a noob in this!).

TOPICS
Scripting , SDK , Server developers

Views

208

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Dear Kas,

 

You need to first run ExtendScript Toolkit then open command prompt.

cd<spac>path of indesign server <HIT ENTER>

indesignserver -port 12345 <HIT ENTER>

 

After that "select the target application" indesign server with port at ExtenScript Toolkit and run your script.

 

 

 

 

-Sumit

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Thanks for your answer, Sumit!

But this doesn't work for me.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Dear Kas,

 

Can you share me screenshot of "select target application" dropdown of ExtendScript after start indesign server?

I work daily with these commands and it work perfectly.

 

STEP 1: Launch ExtendScript Toolkit
STEP 2: See select target application there is no instance.

SumitKumar_0-1643432807359.png

STEP 3: Open command prompt.

STEP 4: change current directory an run indesign server.

SumitKumar_1-1643433011226.png

STEP 5: Now change "select target application" as new instance of indesign server.

SumitKumar_2-1643433085468.png

STEP 6: Run you script and check output.

SumitKumar_4-1643433165102.png

 

 

-Sumit

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Hi Sumit,

Step 1: started the computer and ESTK

IDS is already on the list

KasyanServetsky_0-1643435568798.png

Step 2: Started IDS

KasyanServetsky_1-1643435620476.png

Step 3: select IDS as the target, but ESTK says it's not running

KasyanServetsky_2-1643435839422.png

Step 4: Click Yes and it takes forever

KasyanServetsky_3-1643435890612.png

I see you have version 2017 and a configuration with port 98989 so I closed IDS and tried to launch it with this port as a parameter:
InDesignServer -port 98989

It says "Servicing SOAP requests on port 98989" but doesn't work.

KasyanServetsky_4-1643436401457.png

Also, the InDesignServerService is missing in the Computer Management > Services.

Yesterday, I uninstalled and reinstalled both IDS and ESTK. It didn't help!

Installed VS Code and tried to run a script from it. It offers to launch IDS and after I click Yes, nothing happens and VSC hangs.

I think that it isn't supposed to work because in the system requirements they say the operating system should be Windows Server 2016/9, but I tried to cheat it and run it on Windows 10. What system are you on?

— Kas

 

 

 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Hi @Kasyan Servetsky,

I don't have access to WIN machine with IDS installed at the moment but if I remember correctly the path to the sampleclient application is not correct. Look for sampleclient inside the IDS installation directory. Something like the following

C:\Program Files\Adobe\Adobe InDesign Server 2020

And the command to run the script would be(I am not aware of the -batch argument)

sampleclient -host localhost:12345 yourScriptPath

Regarding debugging using ESTK, look for the entry with your SOAP port listed. Using the Adobe InDesign Server 2020 application does hang, I have faced this as well. If you don't see the entry with port in the target then try to execute a script with a $.writeln call using sampleclient that should hopefully sort the issue.

Regarding what else is needed to start with IDS, I would say exeprience with InDesign scripting is more than enough to hit the ground running. You need to be aware of some API differences that you already have figured like using documents[0] instead of activeDocument etc. The best way forward could be to execute your existing scripts see where it fails and move it from there. With a couple of such iterations you will have the idea about the things you need to take care of.

-Manan

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Hi Manan,

Thank you for your answer!
I have no idea how I did it, but I got connected to IDS somehow:

KasyanServetsky_0-1643438258548.png

KasyanServetsky_1-1643438272481.png

Note: there are two instances. Version 15.064 is the working one. It's strange: I installed 2020.

— Kas

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022

Copy link to clipboard

Copied

Dear Kas,

 

You can run only indesignserver 15.064.

-Sumit

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Now I can run the scripts both from ESTK and command prompt:

2022-01-29_08-50-26.png

Thank you, guys!

The only thing I am afraid of now: what if it stops working after restart?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 29, 2022 Jan 29, 2022

Copy link to clipboard

Copied

I wonder where the tlb-file is?

From 'Intro to InDesign Server 2020.pdf' — pages 23-24:

To remain valid, the InDesign Server type library is created or updated on start-up and stored on the local hard drive. The resulting .tlb file is saved to the Application Data folder:
C:\ProgramData\Adobe\InDesign Server\<version>\<locale>\configuration_12345\ScriptingSupport\<version>\Resources for Visual Basic.tlb

But there's no Scripting Support folder:

KasyanServetsky_0-1643453423245.png

I see IDS in the list, but the library won't load:

KasyanServetsky_0-1643454125497.png

 

 

 

 

 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 29, 2022 Jan 29, 2022

Copy link to clipboard

Copied

Found it here:

C:\ProgramData\Adobe\InDesign Server\Version 15.0\en_US\configuration_12345\Scripting Support\15.0\Resources for Visual Basic.tlb

But it trows another error:

KasyanServetsky_0-1643455566695.png

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 30, 2022 Jan 30, 2022

Copy link to clipboard

Copied

LATEST

Dear Kas,

 

I am not aware of it so can not comment on this.

-Sumit

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines