James Lockman's Technical Blog

Posts tagged "InDesign Server"

Customers who move from a file system to a Digital Asset Management (DAM) system such as Adobe Experience Manger Assets (AEM Assets) realize many benefits, including but not limited to more comprehensive search, access to augmented asset metadata, and workflows to syndicate content to multiple channels. Assets under management in many DAM systems tend to be locked in the DAM, accessible through a search interface that lets users collect assets for extraction from the DAM. Once the user downloads the assets, however, the “M” part of DAM breaks. This article presents best practices for allowing Creatives to use content from DAM such that DAM maintains control over the asset and the “M” part of DAM is preserved.

AEM Assets, like most modern DAM systems, provides two basic functions: asset and associated metadata storage, and access to those assets through a search interface in a browser. AEM offers a method to mount the repository on the desktop, exposing assets to end users as if they had been downloaded from DAM. When you combine search with the ability to expose assets as files, you get a very powerful combination that will be the subject of the rest of this article. AEM also provides robust workflows that can be activated through a variety of triggers. We will touch on workflows later in this article as a way to extend these core capabilities.

AEM 6.1 and higher has a UI preference to enable desktop actions. This means that if a user selects a file or folder, the user can choose to Reveal on desktop or Open on desktop. These actions are meaningful when you install the AEM Desktop Tool, which is a free application available on Mac and Windows. We will circle back to them in a few minutes.

The AEM Desktop Tool is a client that exposes the AEM Assets repository as an SMB file system. This allows any Creative Cloud desktop application to access DAM content without the need for any plugins or extensions. Download and install the AEM Desktop Tool from the Direct Download page. This page also shows any dependencies that may be required on the AEM side to support the current release of the Desktop Tool. Check with your AEM System Administrator to ensure that the correct packages are installed on AEM before you install the Desktop Tool. Once you have the packages installed and activated, you can install AEM Desktop. Once you install AEM Desktop, you can mount your AEM Assets server as a volume on your desktop. Login using your Author credentials.

Once you login, your AEM Assets repository appears as a mounted volume.

To enable desktop actions in AEM, you need to enable a setting in your user preferences in AEM. Navigate to your Preferences page (path varies depending on your AEM version, but is is usually found under your profile image in the upper right hand corner of the screen) and enable Show desktop actions for Assets. Click Accept and you’re ready to go.

Reveal on desktop and Open on desktop actions appear when you navigate to an asset or folder in the Assets interface in AEM. Hover over a folder in Assets to see the Reveal on desktop icon, and hover over an asset in Assets to see the Open on desktop icon. Reveal in desktop is available under the more… indicator. Both of these actions will appear in the rail on an asset details page.

Now that we have the plumbing installed, let’s turn to best practices.

Updating linked assets from DAM

The most common question I encounter from customers who have moved their assets to DAM is “how do I relink my images in DAM from InDesign?” followed by “How do I relink my images in DAM from Illustrator?” This question arises because when these assets were stored on a desktop computer or on a file server, all of the linked images also resided on the same desktop computer or file server. When the assets were ingested into DAM, they no longer appear in the same path, so InDesign, Illustrator and Photoshop get confused as to where these assets are in relation to the files in which they have been placed. Reveal on desktop turns out to be a deceptively simple solution. Follow these steps to relink your assets from DAM in your layout document.

Open your layout document. For the sake of illustration, let’s use InDesign. InDesign will tell you that the links are broken and that they need to be updated. DO NOT LET INDESIGN automatically update the links. We need to do this manually in order to ensure that we make the right connections.

Select the first image in the Links panel

Choose Relink… from the Links panel. A file system browser will open. Do not browse to a file.

Switch to your browser and navigate to AEM Assets

Open your Search interface

Search for the asset by filename or other metadata

Reveal it on desktop. It will now come in focus in your file browser, and it will be selected.

Drag the file onto your already open InDesign relink… file browser.

Release the file and the InDesign relink… file browser will now have your DAM asset selected.

Click open to relink the image.

If you have other images in the same DAM folder, you can then relink to the folder. When you run out of images to link, repeat the Relink…, Search, drag, Open pattern until your InDesign document has all new links. Once you are done, save the InDesign document locally so that you can make changes. Once your document goes through your approval process, upload it to DAM as a new document or as a new version of one already in DAM.

While this may sound cumbersome, once you get the hang of it, it will feel like second nature. Over time, as you make new documents using images in DAM, instead of starting with Relink…, start with Place… or just drag the found-and-revealed image onto your layout. InDesign will link to the image in DAM, and the next time you open the InDesign file, it will be properly connected. If you’d like to see an example, watch this short video.

Customers often ask me about InDesign Server. InDesign Server? Yes, it’s true. InDesign is available as a server, which makes document automation possible for many kinds of businesses. It offers InDesign functions as a service, accessible through SOAP or other communication protocols. It is not the desktop version of InDesign available in a browser.

These are but a few of the use cases for which InDesign Server is appropriate. In all cases, InDesign Server is part of a larger business process, usually driven by a web site or a Digital Asset Management (DAM) solution such as Adobe Experience Manager (AEM) Assets. InDesign Server is also included as a component of many commercial Variable Data Publishing (VDP) and Print on Demand (POD) solutions, but those servers are licensed only for use with those commercial solutions. You can learn more about InDesign Server partners at the InDesign Server Partner Guide.

InDesign Server is a service, really, that responds to questions like:

“Hey, InDesign Server. If I give you this InDesign template, can you merge this XML file onto it and then give me back a print-ready PDF?”

“Hey, InDesign Server. Here’s an InDesign Document. Can you extract all of the text frames as RTF files and re-link them back to their original frames and then save InDesign file as a new document with _relinked added to its name?”

“Hey, InDesign Server. Can you make a new document, import the style sheets from this other document, then import all of the images in this folder, each on a new page, and apply the object style ‘image’ to each image and put a metadata caption with the copyright data in the lower right hand corner of each image, and then export each page as a new PDF with the file name corresponding to the filename of the image placed onto it?”

Of course, those questions must be written as scripts in one of four languages: Adobe ExtendScript, JavaScript, AppleScript or Microsoft Visual Basic. AppleScript and VisualBasic are only available when the server is running in an Apple or Windows operating system, respectively. There is an SDK and many examples available at adobe.com/devnet. There’s really no limit to what you can do with InDesign Server, so long as you have coders who can ask the right questions and so long as you have enough capacity to process the volume of jobs you expect to handle. There are many companies who use InDesign server to build photo books and greeting cards from customer-supplied photos, for instance. They create web sites to help customers design their books and cards online, and the actual print-ready files are made by InDesign Server. They process thousands of jobs per day, so they need to have enough capacity to keep up with their demand. How, then, do you architect an InDesign Server application from the perspective of the servers themselves?

Here’s three questions you need to ask to help scope an InDesign Server application, and then some more detail about InDesign server.

Will your use case allow internal and external users to access the InDesign Server directly? If you use InDesign Server to render an InDesign document as a jpg or pdf and then post the jpg or pdf on your web site, the end user does not have direct access to InDesign server. If you make a web form that lets your end user customize a document and deliver it to them on demand, they do have direct access to the InDesign server.

What is your failover or disaster recovery requirement? The deployment architecture allows for both multiple dedicated servers as well as multiple instances on servers with multiple cores. The licensing will depend therefore on how you mix dedicated servers and instances on those servers.
The deployment architecture will also depend on maximum expected throughput. We usually look at the peak demand per minute or quarter hour or hour, depending on the use case, as well as the end user tolerance for delay between requests and results.

How do you plan to support development for InDesign Server applications? Deployments typically have one or more development instances, and then two or more dedicated production servers with multiple instances available on each server to provide fault tolerance.

InDesign Server is licensed based on use case and deployment architecture, and it is available as an annual subscription like Creative Cloud. Enterprise customers can license in three year terms as part of an Adobe Enterprise Term Licensing Agreement (ETLA). Other customers can purchase annual subscriptions from their favorite Adobe reseller. Consult the Indesign Server Buying Guide for more information.

Across the use case axis, there is Limited and Premium.

Limited allows a customer to use InDesign Server for an application that only their employees can access. It does not allow the customer make an interface that exposes the InDesign Server to any external user. They would purchase Single- or Multiple-Instance licenses depending on how many documents they would process per day, hour or minute.

Premium allows a customer to use InDesign Server for an application that external users could access as well as internal users. Consider the photo book use case where they have a web site that allows customers to upload their photos and buy a photobook. The book is made using InDesign Server driven by a web application. Again, volume would determine whether you would choose Single- or Multiple-Instance licenses.

The deployment architecture axis has two options as well: Single-Instance or Multiple-Instance.

Single-Instance allows one instance of IDS per server per license, and Multiple-Instance allows multiple instances of IDS per server per license. There is no CPU counting required, as the Multiple-Instance license includes an unlimited number if instances on the same server hardware. For instance, if a customer has a 16 core dedicated server with 32 GB of RAM, they could use one IDS Multiple-Instance license and kick off 15 simultaneous instances of IDS at a time (InDesign Server is single-threaded and uses a single core per instance and ideally 2GB of RAM). Other customers choose to deploy many Single-Instance servers on different hardware for fault tolerance and disaster recovery. InDesign Sever has a job queue manager, but many customers choose to build their own queue manager and load balancer. Adobe Experience Manager includes an InDesign Server load balancer and queue manager as part of its integration with InDesign Server. Some customers choose to deploy many Single-Instance servers, while others choose to deploy few Multiple-Instance servers, based on their requirements and available server resources.

How do you decide whether to choose Single- or Multiple-Instance architecture? It is common for high volume use cases to have at a minimum of two Multiple-instance servers, each that can process multiple simultaneous jobs. Two servers provides for fault tolerance, but it does not account for disaster recovery, which would include another instance in a different data center. The number of servers is usually determined by the typical job characteristics measured in seconds to process a typical job, divided by the number of available instances, and compared against the maximum number of jobs that are expected to be processed in a meaningful time interval, usually one minute to an hour. If you are running a financial services company that is generating three hundred complex proposals per hour, and each proposal takes 15 seconds to process, and you have 3 cores available on your server, then your server can handle 3 jobs/15 seconds * 3600 seconds/hour = 720 jobs per hour. Since you need to process 300 jobs per hour, per proposal type, you have enough capacity. But, if you need to know if you can handle the volume at the end of the trading day, when you only have 15 minutes and not an hour to get the proposals out, then your server will fall short and you should likely add another server or two to the cluster.

The last consideration is how you plan to develop and test your applications. You should have at a minimum of one development server that matches your deployment configuration, and there is a Development license available with the same use case and architecture considerations. Developers use their development tools of choice. It is common to use the ExtendScript Toolkit, which is part of Creative Cloud. Using ExtendScript Toolkit, developers can connect to a desktop InDesign to test and debug their scripts. Once they are satisfied with the performance and results, those scripts would either be moved to the InDesign Server Scripts folder or would reside in the web application or DAM, which would send the scripts as part of their job payload.

InDesign Server offers customers document automation capabilities that can provide brand consistency, high volume document creation and even new business opportunities. Whether part of a commercial solution or part of a custom application, InDesign Server delivers performance, flexibility and quality to automated document processing.

Many of my Enterprise customers ask how they can use Adobe Experience Manager (AEM) to automate the production of common derivative files from their InDesign files. Derivative files, you ask? InDesign files often represent the “source of truth” for many business documents, from manuals to data sheets to publications and many more types. These documents must be transformed from InDesign into something else (hence the term derivative) in order to be made available on a web site, for instance. The usual method is to export a PDF from InDesign and then upload the PDF as a new asset into the repository. This puts added burden on the author of the InDesign file as well as introducing the possibility of error due to incorrectly set PDF job options. This gets even more complicated if the author must make versions suitable to send to a commercial printer as well as a version that’s optimized for reading online as a PDF. This article provides techniques to automate the production of a web-optimized and print-optimized PDF from any InDesign file that appears in AEM Assets.

This article assumes that you have access to Adobe Experience Manager Assets and InDesign Server. In this example, I use AEM 6.1 and InDesign CC Server 2015, but the technique should work with AEM 5.6.1 and higher and ID Server CS6 and higher. You need to ensure that you have configured your AEM Author environment to work with InDesign server according to the documentation found here. The foundation of any successful integration (beyond configuration!) is the combination of Scripts, Workflow Models, and Workflow Launchers.

You can download a package that contains the scripts and a workflow model you can use today. When you install the package, you will have new scripts located at /etc/dam/indesign/scripts and /etc/workflow/scripts. You will also see a new Workflow Model located at /etc/workflow/models/dam/. The Workflow Launcher must be reconfigured, since I didn’t want to disrupt your existing workflows after you install the package.

Scripts

Scripts tell AEM or external applications what to do, and they form the basis of any InDesign Server-based solution. There are two sets of scripts used here: one set for InDesign Server to generate the PDFs and the other for AEM to move the resulting files. First, let’s look at the JavaScript to tell InDesign Server what we want it to do and how we want it to respond to the request.

There are a number of InDesign Server scripts included in the basic AEM installation, and I’ve modified /etc/dam/indesign/scripts/PDFExport.jsx to request specific kinds of PDF from InDesign Server. In addition, the script writes the new PDF files into the InDesign file’s /renditions node. These two scripts are located at /etc/dam/indesign/scripts/PDFExport_Print.jsx and at /etc/dam/indesign/scripts/PDFExport_Web.jsx. I could have easily combined these two operations into one script, but I wanted to leave you the option to easily enable or disable each one according to your requirements. You can also combine them yourself or make them fancier, responding to properties you set on the InDesign file in AEM (via XMP) and read out with InDesign Server. Here is the code for PDFExport_Web.jsx, which is almost identical to PDFExport_Print.jsx. The difference is in the value of pdfExportPreset in line 31, the filename set in line 56, and the function return value set in line 57.

To use these scripts, you need to have a PDF Joboptions file installed in InDesign Server to export your PDF. When you install the package, you will find a new folder at /content/dam/InDesign Server joboptions that contains two PDF Export Presets for InDesign Server. Move these two files to Applications/Adobe InDesign CC Server 2015/Resources/Adobe PDF/settings/mul and then restart InDesign Server to load the new settings.

Now that we have the InDesign Server pieces in place, let’s look at the AEM script. This is an ECMA script, which is very much like JavaScript, and it’s located at /etc/workflow/scripts/move-pdf-renditions.ecma. I’ve written it as a function that’s called twice, once for each PDF rendition, so it’s easy to add or remove other renditions as you see fit. This script will be called from the Workflow Model, which we’ll look at next. Here’s the script code.

Workflow Model

There will be a new Workflow Model in your Workflows list called DAM Update Asset with PDF move located at /etc/workflow/models/dam/update_asset_pdf/. It is similar to and derived from the standard DAM Update Asset workflow that comes with every AEM installation. I have changed one existing step (Media Extraction) and added a new step (a Process step called “Move PDFs from Renditions”).

These two workflow steps are different from the standard DAM Update Assets workflow

The Media Extraction step is designed to convert InDesign documents to other formats required by AEM Assets for a number of key functionalities. These include generating sub-assets (images that are embedded within the InDesign file), page images, extraction of text, and metadata synchronization, among other things. Media Extraction sends the script (and a pointer to the InDesign file) as its payload to InDesign Server. InDesign Server then runs the script and returns something to AEM. It is important that you do not remove any of the existing scripts that Media Extraction launches, but you can always add additional steps. Here, we added two additional scripts to the workflow step: PDFExport_Print.jsx and PDFExport_Web.jsx

The Print and Web PDF Export scripts have been added to the Media Extraction Workflow Step.

Immediately after Media Extraction, I added a new Process step that executes an ECMA script in AEM. For many users, they will access AEM Assets via their desktop using the AEM Assets Companion tool or the Creative Cloud Desktop tool, so this workflow ensures that they get the renditions they need in a place that’s easy to find. Also, users of AEM Assets will be able to search for these PDFs like any other asset under management. This script copies the PDFs from /renditions as new assets adjacent to the InDesign file. It is best to leave the PDFs in /renditions so that they can be used by components that might offer the PDF as a download, for instance.

The new Process step executes an ECMA script that copies the new PDF files so that they are accessible on the desktop.

Workflow Launcher

Lastly, it is necessary to change the Workflow Launcher that is triggered whenever a file appears in the repository or whenever a file is modified in the repository. I did not include this change in the package so that you can install the package with no impact on your running system. When you are ready and have tuned the scripts for your workflow, then you can enable the Workflow in the Workflow Launcher panel.

The Launcher is designed to run a workflow when a specific condition is met. This workflow looks for any file that appears in the repository and then runs the DAM Update Asset workflow on it. You need to change the workflow to DAM Update Asset with PDF Move and then Save the changes.

Change the workflow that is triggered by the Launcher

Once you’ve saved the Launcher, you are ready to test. Upload an InDesign document into AEM using your preferred method. You can use drag and drop in a Browser window, AEM Assets Companion, or CC Desktop Tool. If you happen to catch the InDesign Server console, you will see new entries that report on whether IDS was successful at exporting PDF renditions. In a short while, your new PDF files will magically appear next to the InDesign file. Now, go ahead an edit that InDesign file and save it back to AEM Assets. Again, the workflow will run and new PDF files will replace the existing ones, ensuring that you always have access to the latest versions. And, since they are assets under management, you can always revert to earlier versions of the PDF by looking at the asset timeline in a browser.

Conclusion

This new workflow and the scripts that support it expose a new behavior for AEM Assets. While convenient for the user, since it automatically generates useful and necessary derivatives of the source InDesign asset, it enforces known good business processes by encapsulating approved PDF Export settings into he workflow. It also reduces errors by automating a task that otherwise would require several configuration steps in InDesign before they could export the PDF.

I hope that you find this useful, and that you use it as a starting point for further InDesign Server automation using AEM Assets.

I will be presenting a session on Variable Data Design at Adobe MAX this year. While I’ve presented at MAX previously, recently it’s been all DPS or AEM-related discussions. This talk digs deep to my roots in Data Driven Marketing and Variable Data Publishing. From the abstract:

Learn how to take personalized communications beyond email. Before email, there was data merge, which enables you to create personalized print materials using the design tools you already know and love. Whether for mailing campaigns, photo books, directories, business cards, or even t-shirts, you can use data merge to personalize your projects.

In this session, you’ll discover how to:

Unlock the potential of personalization in InDesign

Use Illustrator and Photoshop to generate personalized assets to use with InDesign

Manage personalization on a large scale with popular third-party variable data printing (VDP) solutions

Many of my customers have learned that CQ5.5 DAM can be used in conjunction with InDesign Server to extract content from InDesign documents and make them available for use in web pages in CQ. This worked great with CQ5.5 and InDesign CS5.5 Server, but failed with InDesign CS6 Server. I have an easy fix that enables InDesign content extraction for CQ5.5 and InDesign CS6 Server workflows.

First, start up your CQ Author environment and log in. Open CRXDE and search for spaceUnit. It will show up in one of the InDesign scripts.

Right under spaceUnit is another variable called marginUnit. Comment out those two lines of code from the script, and you should be all set.

Apparently spaceUnit and marginUnit were supported in CS5.5 and earlier, but not in CS6.

Also, Adobe Drive 4 is required for DAM integration with CS6 applications. If CS5.5 is in play, then you will need Adobe Drive 3. As of August, 2012, the download link is halfway down the right hand column of the Adobe Drive Product Page. Drive 3 and Drive 4 can coexist if you need to have CS5/5.5 and CS5