• openKM File Preview

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #18966  by maverick757
 
Hello everyone

I have a problem with my openKM configuration. I am running openKM on a Centos 6.3 x86_64 machine. I want to use preview for the file types .doc(x), xls(x), ppt(x), txt and pdf. I installed OpenOffice 3.4.1 from the RPM which wasn't to easy since CentOS decided to remove OpenOffice from the repo and add LibreOffice instead. I also installed pdf2swf and added the following to the openKM Config (in the adminstration Panel):
Code: Select all
system.swftools.pdf2swf /usr/bin/pdf2swf
system.openoffice.path /opt/openoffice3.org
File preview isn't working yet. Befoce I installed OpenOffice and added the pdf2swf file path, there was an error report when I clicked on Preview. Now there is only an Popup saying:
Code: Select all
"The system has generated an error - Conversion". Thats everything.
Could you please help me to get the file preview running? I don't really care wether OpenOffice or LibreOffice is used for file conversion, I just want it to work.

Kind regards
maverick757
 #18981  by macjaeger
 
I'm using LibreOffice instead of OpenOffice.org, without any shortcommings. You do not need to install pdf2swf manually, it's already inside bin-folder in your OpenKM installation; to correctly call pdf2swf you have to add some commandline parameters, have a look inside the wiki!

To test OpenOffice you can upload a .odt file and try downloading it as pdf, there's only OpenOffice involved. If this works, then pdf2swf is at fault.
 #18984  by maverick757
 
Thanks for the reply. Do I have to do anything besides telling openKM where it finds OpenOffice? I read something about a start script running OO in headless mode.

I think I will set up the server new in a few weeks (it was just for testing atm). I think I'll use LibreOffice, too then, because it's a lot easier to install using yum.
How did you go on ahead after the installation of openKM (Installation of LibreOffice and configuration in openKM?)

Kind Regards
maverick757
 #18988  by macjaeger
 
I installed OpenKM on Ubuntu 12.04. I had LibreOffice installed through apt-get install, then i entered the path to soffice.bin in OpenKM, and that's it. I did not configure any special startup-scripts, afaik OpenKM will start OpenOffice / LibreOffice automaticly. I think you also need to install java for OpenOffice to run properly, at least i did so anyway.
 #19004  by maverick757
 
Okay, I'll give that a try.
By the way: I tried to download a .odt as .pdf, that did not work. Astonishingly downloading a .docx file as .pdf worked (Not as well as aspected, font style and a few other things were a bit messy).
I don't really want to reinstall the server now because I am just testing openKM and playing around.
Seems like OpenOffice is working or what do you think?
Where exactly in the wiki can I find the part about the pdf2swf configuraion?

Kind regards
maverick757
 #19015  by macjaeger
 
maverick757 wrote:I tried to download a .odt as .pdf, that did not work.
...
Seems like OpenOffice is working or what do you think?
Nope, there's something wrong with OpenOffice! It should be able to convert .odt to .pdf - if it is not, you might miss some essential part of OpenOffice. Did you install java jdk?
 #19018  by maverick757
 
Yes, right after I installed OpenOffice. How can I check whether OpenOffice is installed properly?
 #19020  by macjaeger
 
Sorry, can't help you there - OpenOffice always worked for me out of the box. But since you can convert some files but not others, it seems OpenOffice is only "a little broken". Maybe un- and re-installing would help (at least that's the windows' way to do it... *g*).
 #19340  by techexpress
 
Installation for CentOs is not as easy as Ubuntu , sorry for my english !!
CentOs 5 or 6 x64 are my favorite distros but it's not very easy to install OpenKM on it. The best is running with VirtualBox and take a snapshot at each step. I did a lot of tests and here is the recipe :

So you need to install your CentOs in minimal without Gnome destop.

I test it with openkm-6.0.1-linux-x64-installer I have some problem with 6.2.4 may be an error I will wait next week. Don't add rpm forge , or disabled them BEFORE install and configure Open KM. Don't start OpenKM.

You need to install manually Open Office I give you the info for French version 3.4.1:
Code: Select all
source :  http://www.if-not-true-then-false.com/2010/install-openoffice-org-on-fedora-centos-red-hat-rhel/ 
First we remove some old package if they exist
Code: Select all
yum remove openoffice.org* libreoffice.org*
wget Apache_OpenOffice_incubating_3.4.1_Linux_x86_install-rpm_fr.tar.gz
tar -zxvf Apache_OpenOffice_incubating_3.4.1_Linux_x86_install-rpm_fr.tar.gz
cd fr
rpm -Uvh RPMS/*.rpm
We need to exclude upgrade for now
Code: Select all
nano -w /etc/yum.conf

## Add exclude row
exclude=openoffice.org-ure* libreoffice-ure*
Code: Select all
cd 
updatedb
locate soffice.bin
/opt/openoffice.org3/program/soffice.bin
so you need to put /opt/openoffice.org3 to the setting 
system.openoffice.path	String 	/opt/openoffice.org3 
For sftools , you can take the one inside opt/instalaltion path/tomcat/bin. Or you can compile it and add the librairies:
Code: Select all
sources : http://wiki.openkm.com/index.php/Third-party_software_integration:_SWFTools
http://www.myfotoblast.com/blog/?p=153
Code: Select all
yum install tcl tcl-devel libpng-devel libjpeg-devel libpaper-devel giflib giflib-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel zlib-devel gcc gcc-c++ make autoconf libtool automake
wget http://www.swftools.org/swftools-0.9.2.tar.gz
tar -xzvf swftools-0.9.2.tar.gz
mv swftools-0.9.2 swftools
cd swftools 
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz
cd lib/pdf
tar –xzvf xpdf-3.03.tar.gz
cd ..
cd ..
./configure -prefix=/usr
make 
cd swfs
We need to edit Makefile and remove two lines with rm -o (CTRL+K on each line + CTRL+WX to save and exit)
Code: Select all
nano Makefile
rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L $(pkgdatadir)/swfs/default_viewer.swf
rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L $(pkgdatadir)/swfs/default_loader.swf

cd ../
updatedb 
locate pdf2swf
/usr/bin/pdf2swf
for setting
system.swftools.pdf2swf you need to put :
Code: Select all
/usr/local/bin/pdf2swf –T 9 -f -t -G -s storeallcharacters ${fileIn} -o ${fileOut} 
for ImageMagick just:
Code: Select all
yum install ImageMagick*
which convert
for setting system.imagemagick.convert you need to put
Code: Select all
/usr/bin/convert 
So start OpenKM and try to upload an jpeg, and PDF file, also .doc (not docx or save them in word 97 format) and .odt file.
It should work :lol:

Give us feedback to help users and OpenKM's team
Last edited by techexpress on Sat Nov 17, 2012 3:56 am, edited 1 time in total.
 #19365  by jllort
 
The real problem is on some linux distribution is difficult install some packages. For example for backup you can use rdiff-backup that's on official ubuntu or debian repos but on redhat / centos can be more difficult than make yum install rdiff-backup ( that's the different, if you have good control of redhat / centos distribution there's no major problem ).
 #23740  by puce
 
For CentOS minimal instal 64 bit, after installing LibreOffice you need to add headless code
Code: Select all
yum install libreoffice-headless.x86_64
This solved my preview problem.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.