AnsweredAssumed Answered

Creating version-specific renditions

Question asked by andrewg5e on Aug 6, 2012
Latest reply on Aug 13, 2012 by afaust
I'm using a space rule to automatically create PDF renditions of MSOffice documents that are created or versioned in a space. I'm using CMIS to talk to Alfresco, via the OpenCMIS ATOM endpoint (alfresco/cmisatom).

My script is very simple, based on the examples in the wiki for the Version Service:

var renditionDef = renditionService.createRenditionDefinition('cm:wsptPdfRendition', 'reformat');
renditionDef.parameters['mime-type'] = 'application/pdf';

renditionService.render(document, renditionDef);

What I notice using the OpenCMIS browser and the Node browser is that each new version of a document points to the same rendition. There's a rendition child association with the primary node (e.g. workspace://SpacesStore/xxxxx). In the version history in the version2Store, each version has a child node that's a rendition, but the "reference" property for each rendition node points to the same rendition node in the SpacesStore. That node is also a child node of the primary node (latest version) in the SpacesStore.

So this means that all the "old" versions have the same PDF rendition.

I suspect the problem is that I'm not passing the correct node into RenditionService.render in my script. Is that correct? Is there something else required to tie a rendition to a specific version of a document?

I'm using Alfresco 4.0.d, and OpenCMIS 0.7.0 (Java) as a client.

Thanks in advance.

Outcomes