You are here

Alfresco and Adobe InDesign

Chris Hudson's picture
Chris Hudson

Within the publishing industry there are many tools to assist in the layout and production of formatted content, but one of the most prevalent is Adobe InDesign.

Unfortunately, by default Alfresco does not have any integration with this tool, but luckily it is possible to extend both Alfresco and InDesign to create a more unified publishing workflow.

The first thing that you may want to do with Alfresco and InDesign is to automatically extract metadata from the content. Extending Alfresco metadata extraction frameworkallows us to read the Extensible Metadata Platform (XMP)information from within the files and map it to the desired location of the Content Model. There is a project on Alfresco Forge that gives a basic implementation of this (, but to truly make it extensible and understand the advanced use that can come from XMP, I would recommend developing your own extractor and investigating the XMP standard via the documentation available on Adobe’s websites.

Once you have the file and metadata in Alfresco, you may want to display previews in the Alfresco Share interface. There are a few ways of doing this, the first approach would be to setup InDesign so that by default it saves previews of each page within the INDD document. This allows us to find the previews within the binary data and construct preview renditions using Alfresco’s transformation services:

XMPIterator it = xmpMetadata.iterator(com.adobe.xmp.XMPConst.NS_XMP, "PageInfo", null);
			boolean found = false;
				XMPPropertyInfo propInfo = (XMPPropertyInfo);
					found = true;
					String bytes = (String)propInfo.getValue();
					OutputStream out = writer.getContentOutputStream();
					out.write(Base64.decode(bytes.getBytes() ));
		} else{

The other way is much more robust but involves using Adobe’s InDesign Server software and communicating with it from Alfresco using either SOAP or RMI calls, as well as needing to transfer documents to the server for processing. This is a much more heavy duty solution and would also incur costs (software, server software licence), so would only make sense if the InDesign server was also used for other tasks such as generating final production PDFs.

Typically you would also want to allow InDesign direct access to the assets you have stored within the Alfresco repository. One way to achieve this is to use Adobe Drive, which allows you to connect to a CMIS repository such as Alfresco and mount it as if it were a drive on your machine. This allows you to browse Alfresco as if it were a folder structure; however, there are still some integration points with Adobe Drive and the rest of the Adobe Suite that are still in development - for example, the search of content and display of previews via Adobe Drive and Adobe Bridge. To work around this it is possible to use Adobe’s scripting language (Extend Script) to create an interface that you can display within InDesign and then perform your own customizable CMIS (or even custom webscript) calls to search for assets and then use the rendition service to display the same previews available within the document library of Share.

Below is an example of how you can call a webscript from Extend Script using a useful open-source library called Extendables:

	var dialog = commonObject.alfrescoLoginDialog();;
	var user = {username:commonObject.alfrescoUserName,password:commonObject.alfrescoPassword};
	var req = new http.HTTPRequest("GET", urlRequest, timeout);
		 req.header("Content-Length", request.length);
	var res =;
		var errorMsg = res.body;
		if(((res.headers["Content-Type"]) &&  res.headers["Content-Type"].indexOf('application/json')>=0)
			var jsonResp = eval('('+res.body+')');
			errorMsg = jsonResp.message;
		alert(errorMsg, errorText);
	}else if (res.status==401){
		//unable to log in so reset UID and Password
		return res;   

Once you have saved an InDesign document to Alfresco, you may also want to extend its capabilities to assist in your asset management.

For example, if a designer uses some content from their local machine then as soon as someone tries to open the document they will have issues with not being able to find the original link used. Also, using local content that is not in Alfresco means that other people cannot re-use these assets in other documents or locations. A solution to this would be to check the location of any links within the document and then upload content to Alfresco and re-link if it is detected that they are local content.

Another problem that many publishers face is that the XML content that has been used to create an InDesign document may be edited directly within the document, as these content edits are not automatically propagated back to the original document by default. Again,Extend Script comes in handy here, allowing you to re-export the XML and create either new versions or new derivations of your original XML. These new derivations can then be linked by calling webscripts in Alfresco and informing them of the relationship between the new and old documents.

There are many more extensions that can be talked about between these two products and the benefits of using XML and Alfresco in the publishing industry, but I will save them for another time.

I hope this blog has given you some ideas and pointers on the powerful relationship that can be developed between Alfresco and a publishing tool such as Adobe InDesign.

Add new comment