Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Building Indesign CC plugins/scripts with Node JS

New Here ,
Aug 14, 2017 Aug 14, 2017

Here is my problem, I have been tasked with building a plugin/ script for my employer that can be used in Indesign top extract elements out of an Indesign document into the correct formats and then package them up to be imported into our application.

For the most part I have the extraction down, using plain JavaScript. However I have read in several places that it is possible to use Node JS to develop solutions for Indesign which would be great as it would mean I could use some NPM packages to a couple of things I still need to do.

The difficulty here is that everything I have found on the subject is either out of date or when I try the examples they give they simply do not work. I've spent a large portion of time now going through the SDK documentation to try and find my answer but have been unsuccessful.

I did stumble across this article Extend Adobe CC 2014 apps | Adobe Developer Connection  which at least showed me the basic structure of what I needed but I haven't the foggiest idea how I would test this in Indesign.

It really shouldn't be this difficult to write an extension/plugin/script or what ever you want to call them especially since JavaScript and as far as I can tell Node and its various packages can be used, so It would be great if someone could stop me from going round in circles again and put me on the right path.

Thanks.

TOPICS
Scripting
5.0K
Translate
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

correct answers 1 Correct answer

Community Expert , Aug 15, 2017 Aug 15, 2017

Hi Mark,

Its possible to use Node js in the Indesign extension and its not that difficult to do. I will list the points that you need to do in order to get up the extension loaded on your InDesign

...
Translate
New Here ,
Aug 14, 2017 Aug 14, 2017

Following on from this I have since found this link Adobe CEP Resources by Adobe-CEP  which has a bit more information on it but seems somewhat messy/confusing.

I'm assuming that the ZXPSignCmd is the package that is used to create the .ZXP from  your code however the documentation is a little unclear. firstly why isn't there a way to package up applications for development i.e. without using p12 certificates? Secondly if p12 certificates are required why isn't it documented where you should get them from?

Could someone help with this I have a feeling that if I can get over this hump I might be able to do some actual work.

Thanks

Translate
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
Community Expert ,
Aug 15, 2017 Aug 15, 2017
LATEST

Hi Mark,

Its possible to use Node js in the Indesign extension and its not that difficult to do. I will list the points that you need to do in order to get up the extension loaded on your InDesign

  • Refer CEP 6 HTML Extension Cookbook for CC 2015 · Adobe-CEP/CEP-Resources Wiki · GitHub and GitHub - Adobe-CEP/Samples: Samples for Adobe Common Extensibility Platform (CEP)
  • In order to get your extension running you need to copy your extension into a specific folder on your machine depending upon whether you are on a MAC or WIN. Refer the Where are the extensions section in the first URL i mentioned and copy over your code to that location, i would suggest you to first try with a sample extension, from the second URL copy it over to the location it needs to be placed and see if it loads or not
  • Now regarding the signing thing and the zxpsigncommand and p12 thing, these are not needed at the development time. If you want to load you extension without going through the hassle of signing, refer the section Debugging Unsigned extensions in the URL i mentioned first. Following the instructions mentioned in this section you can configure your machine to load unsigned extensions. Once you are done with loading and developing your extension then we can look into the signing part, i will guide you on that later.
  • In order to use the extensions given in the Github project you might have to edit the manifest file, depending upon which version of InDesign you have. Look at the version no of the InDesign mentioned in the Application Version section of the first URL i gave and change it accordingly in the extension you try to load. For CC2017 the version would be 12
  • As regards using node.js its mentioned in the first URL, for CC2017 you need to make and entry in manifest.xml to enable it. I don't have it handy right now, but if you get stuck on that i will find that out for you.

I would suggest that you first setup the machine for loading unsigned extensions, download a sample extension and try to load it. Once done, get familiar on how to debug the code. After all this is done you can configure your extension to use node js and you are good to go.

Let me know if something is not clear.

-Manan

Translate
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