• [SOLVED] Error previewing tif file

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #22561  by quelo1972
 
I've installed OpenKM 6.2.3 (build: 7945) on an ubuntu server precise/pangolin 12.04.2 LTS

When I preview a tif image i got the folowing error:

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

a temporary file is generated named
$TOMCAT_HOME\repository\cache\pdf\e56e9531-a0a0-4786-92b0-febac55a4e2b.pdf
but its content is the following text "No pdftotext available"

no file is generated in
$TOMCAT_HOME\repository\cache\swf\

imagemagic is installed and configured as
system.imagemagick.convert String /usr/bin/convert

pdf2swf is installed and configured as
system.swftools.pdf2swf String /usr/bin/pdf2swf -T 9 -f -t -G -s poly2bitmap -s storeallcharacters ${fileIn} -o ${fileOut}

Previewing jpg or png does work!

Can anyone help me please?

Thanks in advance.
Last edited by quelo1972 on Mon May 06, 2013 11:48 am, edited 3 times in total.
 #22586  by jllort
 
get your image and try to convert to pdf in your server command should be something like:
convert image.jpg image.pdf
 #22599  by quelo1972
 
I have installed poppler-utils which contains pdftotext command line executable and now in the $TOMCAT_HOME/repository/cache/pdf/ directory is generated a pdf file but corrupted non readable and in the $TOMCAT_HOME/repository/cache/swf/ directori is generated a correct swf file but from the OpenKM interface when I click on the tif file I have the same error.
 #22609  by jllort
 
you should not use other util becase convert is used form more things than convert files to pdf to add new command in openkm is needed some source changes. From what you say the command with -format in your case goes right but without it not ? I have tested in my computer and comand goes right. Could be a problem with you imagemagick version or some missing library etc... concentrate in imagemagick, your os distribution and try to find why the command is not going right to you.
 #22626  by pavila
 
Also I recommend to download last night build (I have uploaded some source changes and will be generated tonight, so download tomorrow).
 #22647  by quelo1972
 
Can you paste here the link to download the latest build? How can I upgrade from my installed build to the latest?
Thanks.
 #22687  by quelo1972
 
I have done the update but if I go to "About OpenKM" the version is 6.2.3 and not 6.2.4!
The version is update or not?
 #22714  by jllort
 
quelo1972 as is indicated in migration guide you must delete webapps/OpenKM folder and work/Catalina/localhost folder also. Otherside you will not see any change after start openkm.
 #22789  by quelo1972
 
Ok I've done it now the version is correct and I can't still preview the tif file.
I have the same error!
 #22804  by jllort
 
I think your problem is the command line that in your case for some reason is not executing convert image.tif to image.pdf. Replace the convert utility to convert.sh and take in consideration how parameters are passed ( here for example can see a pdf2swf wrapper http://wiki.openkm.com/index.php/SWFTools )
 #22884  by quelo1972
 
I have configured
system.swftools.pdf2swf String /mnt/OpenKM/tomcat/bin/pdf2swf -T 9 -f -t -G -s poly2bitmap -s storeallcharacters ${fileIn} -o ${fileOut}
and now it works!
Thanks!

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.