document preview not working alfresco 4.2.X

To enable document preview in Alfresco 4.2.X follow the steps below:

 

Verify that ooo.enabled is set to 'true' in alfresco-global.properties

sudo vi alfresco/tomcat/shared/classes/alfresco-global.properties

### External executable locations ###

ooo.exe=/opt/alfresco-4.2.d/libreoffice/program/soffice.bin

ooo.enabled=true <-------------------------------------------------------SET THIS TO TRUE

ooo.port=8100

img.root=/opt/alfresco-4.2.d/common

img.dyn=${img.root}/lib

img.exe=${img.root}/bin/convert

swf.exe=/opt/alfresco-4.2.d/common/bin/pdf2swf

swf.languagedir=/opt/alfresco-4.2.d/common/japanese

copy the libreoffice_ctl.sh to ctl.sh

cp alfresco/libreoffice/scripts/libreoffice_ctl.sh alfresco/libreoffice/scripts/ctl.sh

If you check the alfresco.sh file, the script file for Libre Office is set to ctl.sh, either change the alfresco-global.properties file or create a copy of the script file.

 

Restart Alfresco and the preview works like a charm!

FYI, if you haven't upgraded to 4.2.D, I suggest you do it and enjoy the neat new interface.

Click Here for 21 steps to upgrade Alfresco