Page 1 of 1

[SOLVED] Error previewing tif file

PostPosted:Thu Apr 18, 2013 8:16 am
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.

Re: Error previewing tif file

PostPosted:Fri Apr 19, 2013 6:18 pm
by jllort
get your image and try to convert to pdf in your server command should be something like:
convert image.jpg image.pdf

Re: Error previewing tif file

PostPosted:Sat Apr 20, 2013 8:02 am
by quelo1972
Doesn't work also from command line.

Re: Error previewing tif file

PostPosted:Sat Apr 20, 2013 10:26 am
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.

Re: Error previewing tif file

PostPosted:Sun Apr 21, 2013 6:53 pm
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.

Re: Error previewing tif file

PostPosted:Mon Apr 22, 2013 2:13 pm
by pavila
Also I recommend to download last night build (I have uploaded some source changes and will be generated tonight, so download tomorrow).

Re: Error previewing tif file

PostPosted:Tue Apr 23, 2013 10:07 am
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.

Re: Error previewing tif file

PostPosted:Tue Apr 23, 2013 7:21 pm
by pavila

Re: Error previewing tif file

PostPosted:Wed Apr 24, 2013 10:59 am
by quelo1972
Thanks

Re: Error previewing tif file

PostPosted:Wed Apr 24, 2013 11:42 am
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?

Re: Error previewing tif file

PostPosted:Thu Apr 25, 2013 9:55 pm
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.

Re: Error previewing tif file

PostPosted:Mon Apr 29, 2013 3:41 pm
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!

Re: Error previewing tif file

PostPosted:Tue Apr 30, 2013 7:51 am
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 )

Re: Error previewing tif file

PostPosted:Mon May 06, 2013 11:47 am
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!