Wednesday, March 10, 2010

Alfresco Notes - installing pdf2swf

From alfresco.log:
12:34:14,358 ERROR [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] Failed to start a runtime executable content transformer:
Execution result:
os: Linux
command: [/opt/Alfresco/bin/pdf2swf, -V]
succeeded: false
exit code: 1
out:
err: Cannot run program "/opt/Alfresco/bin/pdf2swf": java.io.IOException: error=2, No such file or directory

You will need to install pdf2swf.
You can get the tar.gz from here: http://www.swftools.org/download.html
I used the newest development snapshot.
You will need a bunch of devel packages as dependencies, something the swftools doesn't tell you in their FAQ. THe FAQ will tell you that you need freetype and jpeglib, but you will need others too. http://wiki.swftools.org/index.php/FAQ
Download the tar.gz and run:
# tar -zvxf swftools-0.x.x.tar
# cd swftools-0.x.x
# ./configure

You will need gcc, gcc-devel, gcc-c++, gcc-c++-devel, gdb, freetype, freetype-devel, libjpeg, ligjpeg-devel, giflib, giflib-devel, giflib-utils, make, gd, gd-progs, gd-devel, fontconfig-devel, libpng, libpng-devel, libgomp and whatever dependency that might pop up.
At that point, when ./configure runs cleanly without any errors, will you be able to run:
# make
# make install

Then you will need to update /opt/Alfresco/tomcat/shared/classes/alfresco-global.properties
and update:
swf.exe=/usr/local/bin/pdf2swf (or where you installed pfd2swf)


No comments: