06-27-2017 07:19 AM
I have a java web application with Jquery and HTML5 on front end. We are using CMIS library to download the documents uploaded. We now want to preview the alfresco documents in browser with zoom and scrol facility. Please suggest a suitable plugin/api that can be integrated for this.
I read on this :
https://community.alfresco.com/docs/DOC-6802-alfresco-one-rest-api-previewing-content
However, is this plugin suitable for my requirement and will it support preview of different types of documents that alfresco supports or is useful for only PDF?
07-06-2017 07:45 PM
Hi. We use pdf.js (see PDF.js ) We simply created a webscript that takes the nodeRef of the document, uses the renditionService to create a PDF rendition and returns the rendered file download URL (consumed by PDF.js).
example in JavaScript: (see Rendition service | Alfresco Documentation )
var renditionDef = renditionService.createRenditionDefinition('cmdfExport', 'reformat');
renditionDef.parameters['mime-type'] = format;
var renderedNode = renditionService.render(node, renditionDef);
Explore our Alfresco products with the links below. Use labels to filter content by product module.