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 options.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

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 options.

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?

1 Reply
Highlighted
Member II

Re: 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 options.

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('cmSmiley TonguedfExport', 'reformat');
renditionDef.parameters['mime-type'] = format;
var renderedNode = renditionService.render(node, renditionDef);