Alfresco Connector installation
Follow the steps below to install Alfresco Connector for VirtualViewer® HTML5 :
Prerequisites
- Alfresco Share v5.1, Enterprise edition preferred, which includes Java run-time 1.7.
- 8 GB plus of memory available. Add more to get better performance.
-
Download the Alfresco Connector for VirtualViewerJavaHTML5 if you have not done so already.
-
Install the VirtualViewer war file in the [alfresco directory]/tomcat/webapps directory.
You might have to start/stop Tomcat with [alfresco directory]/manager-windows.exe to install the war file.
-
Check the permission on the new Alfresco folder before proceeding.
-
Go to the [alfresco directory]/tomcat/webapps/VirtualViewerJavaHTML5 directory. Copy snowbound-repo-
.amp to the alfresco/amps directory. Copy snowbound-share-
.amp to the alfresco/amps_share directory. -
Use [alfresco directory]/manager-windows.exe to stop Tomcat and postgres.
-
Open a cmd window and navigate to the [alfresco directory]/bin directory and run
apply_amps.bat -verbose -force
You might have to hit Enter to keep this running.
-
Once amps finishes installing, start Tomcat and postgres with [alfresco directory]/manager-windows.exe.
Verify installation
To verify your installation of Alfresco Connector for VirtualViewer:
-
From a cmd promp, run
localhost:8080/share
. -
Log into Alfresco with your Alfresco username and password. Click on My files in the top menu.
-
Click upload to upload a test file. After the file is uploaded, scroll to the bottom of the page and click on the uploaded file link. This should open a Document Details page within VirtualViewer.
Configuring Alfresco Share to use alternate viewers
Use the web-preview.get.config.xml file to configure Alfresco Share to use alternate viewers to launch files based on MIME type.
Here is a link to the source: https://github.com/SnowboundSoftware/alfresco-snowbound-integration/blob/master/snowbound-share/src/main/resources/alfresco/web-extension/site-webscripts/org/alfresco/components/preview/web-preview.get.config.xml
Troubleshooting
Installation issues
If you have trouble with your installation, please see the following troubleshooting tips:
-
If the output to the console is “File not found”, this could be related to the permission levels of the installation. The administrator should ensure they have “Full Control” over the Alfresco directory.
-
If you are having trouble loading a document, please make sure that the VirtualViewer license file,
SnowboundLicense.jar
, is stored in the VirtualViewerJavaHTML5\WEB-INF\lib directory. -
If
localhost:8080/share
returns a 404: not found error, it could be because, during installation, Tomcat was running whenapply_amps
was run. Rerun installation with Tomcat stopped while runningapply_amps
.
Alfresco 4 vs. Alfresco 5
There is a difference between Alfresco 4 and Alfresco 5 that affects the VirtualViewer Connector. In order to ensure correct functioning, perform the following based on your Alfresco version:
-
Change the ticket.get.js
web-script
. Alfresco 5 does not use the session variable. -
If you are using Alfresco 4.x, change [alfresco directory]/tomcat/webapps/alfresco/WEB-INF/-classes/al- fresco/extension/templates/webscripts/org/content/integrations/snowbound/ticket.get.js to the following:
function main() { var ticket = session.getTicket(); model.ticket = ticket; } main();
Caching issue (VirtualViewer V4.4 and earlier)
When caching is turned on, the Alfresco Upload New Version button will not display the updated document correctly. VirtualViewer will display the older version until the document is cleared from the cache. This will cause the FileContentHandler getDocumentContent
method to update the cache. This is a known issue and has been corrected in VirtualViewer V4.5 and later.
You can set the documentCacheSize
parameter to 0
in the web.xml
to force VirtualViewer not to cache, causing the uploaded new version to display correctly:
<init-param>
<param-name>documentCacheSize</param-name>
<param-value>0</param-value>
</init-param>
Have questions, corrections, or concerns about this topic? Please let us know!