• "Download as PDF" produces a SWF file

  • 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.
 #19306  by zio_tom78
 
Hi to everybody,

I'm running OpenKM 6.2 under Ubuntu Linux 12.04. This is the Java version I'm using:
Code: Select all
$ java -version
java version "1.7.0_09"
OpenJDK Runtime Environment (IcedTea7 2.3.3) (7u9-2.3.3-0ubuntu1~12.10.1)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
With this configuration OpenKM runs fine, but there are two problems with my current configuration:
  • Previewing PDF files takes forever and does not show anything
  • Previewing OpenOffice files produces the following error message:
    Code: Select all
    Conversion: Error: May not be a PDF file (continuing anyway)
    Error: PDF file is damaged - attempting to reconstruct xref table...
    Error: Couldn't find trailer dictionary
    Error: Couldn't read xref table
  • The button "Download as PDF" saves a file with extension .pdf which is however a Shockwave Flash file:
    Code: Select all
    $ file lspe_sbf_scientific_requirements.pdf
    lspe_sbf_scientific_requirements.pdf: Macromedia Flash data (compressed), version 6
    
(I've attached the file catalina.log for reference - I turned the log level for log4j.logger.com.openkm.util to DEBUG).

I've set up OpenKM via "Administration > Configuration", the relevant settings are the following:
Code: Select all
system.previewer=flexpaper
system.openoffice.path="/usr/lib/libreoffice/"
system.openoffice.port=2002	    
system.openoffice.tasks=200
system.swftools.pdf2swf="/opt/tomcat/bin/pdf2swf -T 9 -f ${fileIn} -o ${fileOut}"
I had to manually fill the entry "system.swftools.pdf2swf" because it was empty, it took me some time to understand how to format it (I had to dig into OpenKM's source code to discover fileIn and fileOut - is this documented somewhere in the wiki?). I installed LibreOffice using Ubuntu's apt-get, and the executable is indeed /usr/lib/libreoffice/program/soffice.bin. Also, running pdf2swf from the command line using the full path above is ok.

Note that I'm able to solve at least the first problem (previewing PDF hangs the system forever) by change system.previewer from flexpaper to zviewer. But the other two problems still remain.

Has any of you some ideas about where I might look for hints? The log file has not helped me in spotting the cause of the problem.

Thanks very much,
Maurizio.
Attachments
OpenKM log file
(157.83 KiB) Downloaded 343 times
 #19316  by zio_tom78
 
okmuser wrote:Hi,

I don't think OpenKM 6.2 is fully Java 1.7 compatible.

Can you check whether you have the same issues with Java JDK 1.6_37.
I'm sorry, yesterday I mistakenly checked Java's version on my laptop instead of the server running OpenKM. The JDK running there is indeed 1.6:
Code: Select all
$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
okmuser wrote:The pdf2swf has to be completed by the admin user as it is depending on the system you are using (Linux/Windows/BSD).

And it is mentioned here:

http://wiki.openkm.com/index.php/Third- ... :_SWFTools
Thanks for the link. I completely missed it.
 #19522  by miguelromero
 
You must make sure OpenKM is compiling and opening with 1.6 Java version. Also if you are still having some convert/preview problems, you must clear the OpenKM cache for converted documents, where you will find some garbage non valid documents which may cause conflict.
Code: Select all
\tomcat\repository\cache
 #19564  by jllort
 
For what I understand when you click on donwload button you get swf file not pdf. Which kind of file are you trying to convert ? can you test it in our online demo if error is present theere too ?
 #26052  by alberttong
 
okmuser wrote:Hi,

I don't think OpenKM 6.2 is fully Java 1.7 compatible.

Can you check whether you have the same issues with Java JDK 1.6_37.

The pdf2swf has to be completed by the admin user as it is depending on the system you are using (Linux/Windows/BSD).

And it is mentioned here:

http://wiki.openkm.com/index.php/Third- ... :_SWFTools

or you could also choose to use XFlip pdf to swf flip book tool to accomplish this.
ok, you mean converting PDF to swf file, you could try to find the solution by google search!

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.