Non-PDF formats won't be previewed by the Alfresco simple client.
Before checking how to preview the content, let's prepare the repository for this purpose uploading into the repository a PDF file called sample.pdf. To upload the file you can use either the Alfresco simple client (following the previous lab about uploading content) or Alfresco Share with its well known interface.
Now that the sample.pdf is uploaded into Alfresco, let's open a browser and open the following URL.
When the page appears, fill in the requested fields with the correct values and click Go. As previously described the list of nodes in the folder will be shown. Now that the folder is available in the panel, let's see how to preview the content. As shown in the following screenshot, view the file using the View button.
Once the the View button is clicked, another tab will be opened with your PDF file inside.
* Get the node id from a button and the preview page.
// Extraction of the node id from the 'id' attribute of the button.
// Retrieving the Alfresco base url from the form.
// Defining the REST URL for retrieving content.
// Opening a new window with preview of the document.
Where can i find the source code of this tutorial?
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.