Alfresco Share Document Previews

Getting Alfresco Share to correctly display document previews can be a royal pain, hopefully the following information will help you get yours to work.

The headless Open Office packages which come with RHEL5 don’t work correctly, if your using the same O/S
remove the existing installed packages & install the whole program on your server from www.openoffice.org
– This was a big part of our issues.
There are no reasons behind this, just a little bit of information here

Next install the required packages :
pdf2swf
convert

Edit:
vi /usr/local/glassfish3.1/glassfish/domains/domain1/lib/classes/alfresco-global.properties

Change so it reads:
#
# External locations
#-------------
ooo.exe=/opt/openoffice.org3/program/soffice.bin
ooo.enabled=true
img.root=/usr/local/bin
img.exe=/usr/local/bin/convert
swf.exe=/usr/local/bin/pdf2swf

Now check to see if these files that you’ve just installed in ‘/usr/local/bin’ are running correctly, we were having issues, see below:
[root@server bin]# /usr/local/bin/pdf2swf
./pdf2swf: error while loading shared libraries: libjpeg.so.7: cannot open shared object file: No such file or directory

This was because the library wasn’t been located, so we deleted/recreated any links to the missing files in both the below locations (just to make sure, as wasnt sure where each program was looking for its required library)

[root@server /]# find ./ -name libjpeg.so.7
./usr/local/lib/libjpeg.so.7
./usr/lib/libjpeg.so.7

‘/usr/lib’
libjpeg.so.7 -> /usr/local/lib/libjpeg.so.7

‘/usr/local/lib’
libjpeg.so.7 -> libjpeg.so.7.0.0

And ‘just like that’ it was working, make sure you also check where ‘convert’ is working.
It took us hours to figure out what was going wrong, so I hope this shines some light on your dark day.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s