Page 1 of 2

Preview unavailable - jpg files

PostPosted:Tue Oct 05, 2010 11:50 am
by arekk
Hello. Probably already searched the forum, but still I could not run a jpg preview of the cards. I Installed
Code: Select all
debian: / usr / local / bin # ./jpeg2sw f-V
jpeg2swf - part of swftools 2010-08-14-1108
And configuration files I added the appropriate entries, but still not working.
Code: Select all
debian: / # cat OpenKM.cfg opt/OpenKM-4.1_JBoss-4.2.3.GA
...
restrict.file.mime = off
restrict.file.extension =*~,*. bak,. _ *
max.file.size = 25
system.openoffice = on
system.pdf2swf =/opt/OpenKM-4.1_JBoss-4.2.3.GA/bin/pdf2swf
system.png2swf =/usr/local/bin/png2swf
system.jpeg2swf =/usr/local/bin/jpeg2swf
The system on which I installed a Debian 5.0

Re: Preview unavailable - jpg files

PostPosted:Tue Oct 05, 2010 4:35 pm
by jllort
After changing OpenKM.cfg have you restarted the application server ?

Re: Preview unavailable - jpg files

PostPosted:Tue Oct 05, 2010 10:03 pm
by pavila
I would recommed you trying OpenKM-5.0-Beta recently released. We use ImageMagik convert utility to generate the image preview. Visit http://wiki.openkm.com for more info.

Re: Preview unavailable - jpg files

PostPosted:Wed Oct 06, 2010 8:14 am
by arekk
jllort wrote:After changing OpenKM.cfg have you restarted the application server ?
Yes OpenKM restarted as follows
Code: Select all
/Bin#./Shutdown.sh -S
and then
Code: Select all
/bin#./ Run -b 0.0.0.0
But it did not help.

Re: Preview unavailable - jpg files

PostPosted:Wed Oct 06, 2010 8:52 am
by arekk
pavila wrote:I would recommed you trying OpenKM-5.0-Beta recently released. We use ImageMagik convert utility to generate the image preview. Visit http://wiki.openkm.com for more info.
Yesterday I downloaded version 5.0 beta. testing today. if I have difficulty to write

Re: Preview unavailable - jpg files

PostPosted:Wed Oct 06, 2010 2:59 pm
by jllort
Are you using OpenKM version 5.0 no ?
put here you OpenKM.cfg
and server.log trace while you're trying to seeing a jpg file, to look if there's some error

Can you preview other types like openoffice etc.. no ?

Re: Preview unavailable - jpg files

PostPosted:Wed Oct 06, 2010 9:01 pm
by arekk
jllort wrote:Are you using OpenKM version 5.0 no ?
put here you OpenKM.cfg
and server.log trace while you're trying to seeing a jpg file, to look if there's some error

Can you preview other types like openoffice etc.. no ?

I write a little tutorial on what I do and what installs.
1. All the operations I do on VBox
2. Installs Debian 5.0.6-i386 in text mode
3. Downloaded OpenKM-5.0-Beta_JBoss-4.2.3.GA
4. I installed unzip
Code: Select all
unzip /opt/OpenKM-5.0-Beta_JBoss-4.2.3.GA
6. Installs Jave
Code: Select all
debian:/opt/jboss-4.2.3.GA/bin# aptitude install sun-java6-jdk
8. Starting OpenKM see if it works out of the box, enter /bin/and run
Code: Select all
debian:/opt/jboss-4.2.3.GA/bin#./run.sh -b 0.0.0.0
9. Starting OpenKM http://192.168.1.8/OpenKM is working
10. Upload these files *.jpg *.pdf *.doc *.odt
11. Click on the tab preview and gets the message preview available
12. I Stop OpenKM
Code: Select all
debian:/opt/jboss-4.2.3.GA/bin# ./shutdown.sh -S
13. As described http://wiki.openkm.com/index.php/Troubleshooting
Code: Select all
aptitude install openoffice.org2-l10n-es openoffice.org-java openoffice.org-java-common openoffice.org
Code: Select all
Uwaga: Wybrano pakiet "openoffice.org-l10n-es" zamiast
       pakietu wirtualnego "openoffice.org2-l10n-es"
Uwaga: Wybrano pakiet "openoffice.org-core" zamiast
       pakietu wirtualnego "openoffice.org-java"
Następujące NOWE pakiety zostaną zainstalowane:
  bsh{a} bsh-gcj{a} ca-certificates{a} fastjar{a} fontconfig{a}
  fontconfig-config{a} gcj-4.2-base{a} gcj-4.3-base{a} gij{a} gij-4.3{a}
  hicolor-icon-theme{a} java-gcj-compat{a} java-gcj-compat-headless{a}
  libatk1.0-0{a} libatk1.0-data{a} libbcel-java{a} libblas3gf{a}
  libcairo2{a} libcups2{a} libcurl3{a} libdatrie0{a} libdirectfb-1.0-0{a}
  libfontconfig1{a} libgcj-bc{a} libgcj-common{a} libgcj8-1{a}
  libgcj8-1-awt{a} libgcj8-jar{a} libgcj9-0{a} libgcj9-0-awt{a}
  libgcj9-jar{a} libgfortran3{a} libglib2.0-0{a} libglib2.0-data{a}
  libgstreamer-plugins-base0.10-0{a} libgstreamer0.10-0{a} libgtk2.0-0{a}
  libgtk2.0-bin{a} libgtk2.0-common{a} libhsqldb-java{a}
  libhunspell-1.2-0{a} libhyphen0{a} libice6{a} libicu38{a}
  libjaxp1.3-java{a} libjaxp1.3-java-gcj{a} libjline-java{a} libjpeg62{a}
  liblapack3gf{a} liblog4j1.2-java{a} liblog4j1.2-java-gcj{a}
  libmx4j-java{a} libneon27{a} libnspr4-0d{a} libnss3-1d{a}
  libpango1.0-0{a} libpango1.0-common{a} libpixman-1-0{a} libpng12-0{a}
  libregexp-java{a} libservlet2.4-java{a} libsm6{a} libssh2-1{a}
  libstlport4.6ldbl{a} libsuitesparse-3.1.0{a} libsysfs2{a} libthai-data{a}
  libthai0{a} libtiff4{a} libts-0.0-0{a} libwpd8c2a{a} libwpg-0.1-1{a}
  libwps-0.1-1{a} libxalan2-java{a} libxalan2-java-gcj{a} libxaw7{a}
  libxcb-render-util0{a} libxcb-render0{a} libxcomposite1{a} libxcursor1{a}
  libxdamage1{a} libxerces2-java{a} libxerces2-java-gcj{a} libxfixes3{a}
  libxft2{a} libxinerama1{a} libxmu6{a} libxpm4{a} libxrandr2{a}
  libxrender1{a} libxslt1.1{a} libxt6{a} lp-solve{a} myspell-en-us{a}
  openoffice.org openoffice.org-base{a} openoffice.org-base-core{a}
  openoffice.org-calc{a} openoffice.org-common{a} openoffice.org-core
  openoffice.org-draw{a} openoffice.org-emailmerge{a}
  openoffice.org-filter-binfilter{a} openoffice.org-filter-mobiledev{a}
  openoffice.org-impress{a} openoffice.org-java-common
  openoffice.org-l10n-es openoffice.org-math{a}
  openoffice.org-officebean{a} openoffice.org-report-builder-bin{a}
  openoffice.org-style-andromeda{a} openoffice.org-style-crystal{a}
  openoffice.org-style-tango{a} openoffice.org-writer{a}
  openoffice.org-writer2latex{a} openssl{a} python-uno{a} ttf-dejavu{a}
  ttf-dejavu-core{a} ttf-dejavu-extra{a} ttf-liberation{a}
  ttf-opensymbol{a} x-ttcidfont-conf{a}
14. Configure your OpenKM.cfg
Code: Select all
debian:~# nano /opt/jboss-4.2.3.GA/OpenKM.cfg 
Code: Select all
# Default configuration values
#
# repository.config=repository.xml
# repository.home=repository
# system.user=system
# default.user.role=UserRol
# default.admin.role=AdminRol
# principal.adapter=com.openkm.core.UsersRolesPrincipalAdapter
# max.file.size=5
# max.search.results=25
# system.demo=off
restrict.file.mime=off
restrict.file.extension=*~,*.bak,._*
#system.ocr=/usr/bin/tesseract
system.openoffice=/usr/lib/openoffice
#system.img2pdf=/usr/bin/convert
system.pdf2swf=/usr/bin/pdf2swf
#system.antivir=/usr/bin/clamscan
hibernate.hbm2ddl=create
#application.url=http://localhost:8080/OpenKM/com.openkm.frontend.Main/index.jsp
max.file.size=060520010
#principal.adapter=com.openkm.principal.DatabasePrincipalAdapter
15. Starting OpenKM
Code: Select all
debian:/opt/jboss-4.2.3.GA# ./run.sh 
I get the message
Code: Select all
/usr/lib/openoffice/program/soffice.bin X11 error: Can't open display:
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See "man X" resp. "man xhost" for details)
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jboss-4.2.3.GA

  JAVA: java

  JAVA_OPTS: -Dprogram.name=run.sh -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true

  CLASSPATH: /opt/jboss-4.2.3.GA/bin/run.jar

=========================================================================
Found a forum
http://forum.openkm.com/viewtopic.php?f ... y%3A#p6242
I Installed xvfb and created a script...
Well, here I stopped what next?

Re: Preview unavailable - jpg files

PostPosted:Thu Oct 07, 2010 5:43 am
by jllort
You missed installing image converter ( image magick ), that's the reasoin why you can not preview jpg documents
Code: Select all
#system.img2pdf=/usr/bin/convert

Re: Preview unavailable - jpg files

PostPosted:Thu Oct 07, 2010 7:24 am
by arekk
jllort wrote:You missed installing image converter ( image magick ), that's the reasoin why you can not preview jpg documents
Code: Select all
#system.img2pdf=/usr/bin/convert
OK to install the missing package, but I have a problem with the run.
Code: Select all
debian:/opt/jboss-4.2.3.GA/bin# ./run.sh -b 0.0.0.0
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jboss-4.2.3.GA

  JAVA: java

  JAVA_OPTS: -Dprogram.name=run.sh -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true

  CLASSPATH: /opt/jboss-4.2.3.GA/bin/run.jar

=========================================================================
And so nothing happens, and when I run so it gets the message.
Code: Select all
debian:/opt/jboss-4.2.3.GA# ./run.sh
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jboss-4.2.3.GA

  JAVA: java

  JAVA_OPTS: -Dprogram.name=run.sh -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true

  CLASSPATH: /opt/jboss-4.2.3.GA/bin/run.jar

=========================================================================

/usr/lib/openoffice/program/soffice.bin X11 error: Can't open display:
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See "man X" resp. "man xhost" for details)
And do not really know how to use the script from the post found

Edit
I think I know what is wrong aptitude I uninstalled Java. I'll check it out more clearly, and yet, as if he had a problem which I write

Re: Preview unavailable - jpg files

PostPosted:Thu Oct 07, 2010 10:41 am
by arekk
I installed almost everything. It gets these messages for files *.doc, *.odt
Code: Select all
Document URL NOT PREVIDED OR INWALID 

and for files *.pdf, *.jpg
Code: Select all
There was a problem with  the preview generation ples contact Administrator OpenKM 
I Put log files

Re: Preview unavailable - jpg files

PostPosted:Thu Oct 07, 2010 6:19 pm
by jllort
Error is clear
Code: Select all
java.io.IOException: Cannot run program "/usr/bin/pdf2swf"
Have you installed swftools ? if answers is yes, locate your pdf2swf file, normally might be into /usr/bin/pdf2swf

remember removing # into OpenKM.cfg ( are for comment lines, to enable convert )

Re: Preview unavailable - jpg files

PostPosted:Fri Oct 08, 2010 9:19 am
by arekk
jllort wrote:Error is clear
Code: Select all
java.io.IOException: Cannot run program "/usr/bin/pdf2swf"
Have you installed swftools ? if answers is yes, locate your pdf2swf file, normally might be into /usr/bin/pdf2swf

remember removing # into OpenKM.cfg ( are for comment lines, to enable convert )
Success. Pdf and jpg files work. I have a problem with the files *.doc and *.odt Gets the message "Document URL not provided or invalid" Join log files
Code: Select all
# Default configuration values
#
# repository.config=repository.xml
# repository.home=repository
# system.user=system
# default.user.role=UserRol
# default.admin.role=AdminRol
# principal.adapter=com.openkm.core.UsersRolesPrincipalAdapter
# max.file.size=5
# max.search.results=25
# system.demo=off
restrict.file.mime=off
restrict.file.extension=*~,*.bak,._*
#system.ocr=/usr/bin/tesseract
system.openoffice=/usr/lib/openoffice
system.img2pdf=/usr/bin/convert
system.pdf2swf=/usr/local/bin/pdf2swf
#system.antivir=/usr/bin/clamscan
hibernate.hbm2ddl=create
#application.url=http://localhost:8080/OpenKM/com.openkm.frontend.Main/index.jsp
max.file.size=060520010
#principal.adapter=com.openkm.principal.DatabasePrincipalAdapter

Re: Preview unavailable - jpg files

PostPosted:Sat Oct 09, 2010 7:07 am
by pavila
The error is:
Code: Select all
Caused by: java.lang.IllegalStateException: this OfficeManager is currently stopped
You should test if OpenOffice is running:
Code: Select all
ps -ef | grep soffice

Re: Preview unavailable - jpg files

PostPosted:Mon Oct 11, 2010 7:05 am
by arekk
Code: Select all
debian:~# ps -ef | grep soffice
root      2329     1  0 08:50 tty1     00:00:02 /usr/lib/openoffice/program/soffice.bin -headless -display :100 -accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard -splash-pipe=5
root      2443  2432  0 08:56 pts/0    00:00:00 grep soffice
As can be seen running Oo, and
Code: Select all
debian:/opt# netstat -putan | grep 8100
tcp        0      0 192.168.1.20:8100       0.0.0.0:*               LISTEN      2329/soffice.bin
tcp        0      0 127.0.0.1:8100          0.0.0.0:*               LISTEN      2329/soffice.bin
debian:/opt#

Re: Preview unavailable - jpg files

PostPosted:Tue Oct 19, 2010 8:53 am
by pavila
Can you reproduce this issue at the demo server (http://demo.openkm.com) ?