Nuxeo DAM offers numerous features for Digital Asset Management system (content conversion, comparison, and search by color to name a few). Lately we have been looking “outside the box” by focusing on integrating the Nuxeo Platform with other systems.

Many of our users asked us if it would be possible to have access to their assets stored in a Nuxeo repository within Adobe InDesign. So, we spent some time playing with the SDK provided by Adobe and created a simple yet very useful Nuxeo plugin to do that! (Because that’s how we are at Nuxeo: simple and useful :) ).

Use Case

Let’s consider the case when Nuxeo DAM is used as an asset repository by an organization’s marketing team while InDesign is used by designers using the assets provided by the marketing team. This Nuxeo plugin will facilitate the collaboration between these 2 teams by allowing the InDesign users to access the Nuxeo DAM content repository.

Technical Challenges

There were few technical challenges we had to overcome to create this plugin:

  • Authentication
  • Searching assets
  • Link persistency

Authentication was the cornerstone of this plugin as we needed to access to assets that are stored in the Nuxeo Platform. We also needed to persist the links, meaning that we had to detect any changes that were made on the asset within the Nuxeo Platform and notify the user using InDesign.

Features Offered by the Plugin

First you need to have Adobe InDesign of course, then once you installed the Nuxeo plugin (explained in the following section) you just have to go through the following menu Window>Extensions> and click on “Nuxeo InDesign Connector”.

The HTML and JavaScript based plugin displays a list of assets in a thumbnail format. Based on the Nuxeo REST API we retrieve assets that the authenticated user has access to (also explained later). You can also search for a particular asset based on the metadata and the indexing capability of Elasticsearch. A click on a thumbnail of the asset will import it into the current InDesign Document. That’s it! From that point you just let your creativity take the lead.

You might think: what happens if my asset is modified in the Nuxeo Platform?

The answer is straight and simple. You will get notified so that you make the decision of updating your imported asset within InDesign. (I will explain later how it works.)

Notification inside InDesign

Here’s a short demo of some features of the Nuxeo InDesign Connector:

Plugin Installation

Everything you need for installation is here along with a step by step installation guide in the readme.

Structure of the Plugin

In order to be able to import the project in Eclipse you need to install the Adobe Extension Builder from here. Once you import the plugin you should have something like this:

After importing the plugin

The main HTML file is index.html. The plugin is based on the Common Extensibility Platform (CEP 5) of Adobe (previously called CSXS). It allows you to create HTML5 based extensions with a rich interface. This is the latest generation of Adobe’s creative suite extension and is simpler to use than the previous ones based on C++ or Flash. You can find more details on the structure of the extension here.

Handling Authentication Issues

We have several solutions in the Nuxeo Platform for the authentication issues. The classic and basic one is the OAuth or the token based method. We chose the token based because the use case was quite similar to the one on Nuxeo Drive, where a user registered on a Nuxeo instance gets a token. Then every time the user makes a request that token is inserted in the header, and voilà!

We used the same mechanism for the InDesign plugin. The first time you use the plugin you need to click on the settings icon and register to a Nuxeo instance by providing the following information:

click on the settings icon and register to a Nuxeo instance

If everything goes well you will have the following information:

Authenticated the Nuxeo instance from InDesign

Now you have a valid token registered in your InDesign preferences, and every time you open the plugin you will automatically be connected to the Nuxeo instance above with the token using the following code:

//to save the token into InDesign preferences
app.insertLabel("token", token);
//to retrieve the token from the InDesign preferences

Searching Assets from InDesign

By default we display the latest assets imported in the Nuxeo DAM repository (up to 100 results). We also provide two types of search:

  • based on the title of the asset
  • based on the folder of the asset

One of the most challenging parts of the development was to find a solution for link persistency. Assets stored in Nuxeo DAM have their own lifecycle and can go through different types of modification within the Nuxeo Platform or by external tools (such as Adobe photoshop).

We needed a way to detect modifications in an asset in Nuxeo DAM and notify an InDesign user that an asset imported in their current Document has been updated. We chose the solution of polling. We verify regularly whether assets used in the current InDesign document are updated in Nuxeo DAM. For that purpose, when the user imports an asset into his current document we save additional information, such as the unique identifier and the digest (which is a hash of the binary). We then use a fixed time polling loop to check for updates by verifying whether the digest in the Nuxeo Platform is the same or not for each assets present in the current InDesign document. Every time a change is detected, we increment the notification badge. If the user clicks on the sync icon the new version of the asset is imported into their current InDesign document. That’s it!