Page 1 of 1

TIF Images Not Previewing on 6.2.3 & 6.2.4-DEV

PostPosted:Sat Apr 20, 2013 12:26 am
by DonWMason
I've spent some time on this and here is a complete brain dump:

Just set up OpenKM 6.2.3 on both Windows Server 2008 and CentOS 6.4, 64-bit. Also set up swftools, OpenOffice, ImageMagick, and tesseract. All parameters set correctly in Administration, Config.

I upload a TIF file from our legacy AppeXtender system (I have 500K images to migrate into OpenKM). The file is created correctly. The OCR runs correctly.

Both instances give me the same error: the image is not displayable when I click on preview. I found the TIF file in the repository/datastore/d6/57/9f/c5 directory, and I found the PDF file in the /repository/cache/pdf directory. The TIF file (named d6579fc5-e74c-4e15-b23c-24ce865a1f79, without an extension), when renamed to d6579fc5-e74c-4e15-b23c-24ce865a1f79.tif, is a valid TIF image which is can be opened by any viewer. The PDF automatically created by the system, d6579fc5-e74c-4e15-b23c-24ce865a1f79.pdf, is 0 bytes (there are also examples where it is 4KB) and not a valid PDF. There always appear to be documents in the /repository/cache/pdf directory even when I'm the only user of the system and I'm not active.

Both instances display JPGs just fine.

A valid PDF is built if I run the following command:
Code: Select all
convert -format pdf "C:\inetpub\repository\datastore\d6\57\9f\c5\d6579fc5-e74c-4e15-b23c-24ce865a1f79" "C:\inetpub\repository\cache\pdf\1ec2db4d-0289-45cb-b164-68be8ea1dffd.pdf"
I've also downloaded and installed 6.2.4-DEV (build: 7983) with the same error. However this version did clear up the permission problem with LDAP/Active Directory groups showing up as users (on the right side) and not roles.

My question is what is OpenKM doing with the TIF file to convert it to a PDF. Whatever it's doing is NOT working on v6.2.3 or 6.2.4.DEV.

I am unable to see the actual command(s) being used. What should I add to conf/log4j.properties to turn debuggin on?

Re: TIF Images Not Previewing on 6.2.3 & 6.2.4-DEV

PostPosted:Sun Apr 21, 2013 6:37 pm
by jllort
I think is ussing the same command without -format pdf
command is convert image.tif to image.pdf ( that should go right too ).

Re: TIF Images Not Previewing on 6.2.3 & 6.2.4-DEV

PostPosted:Mon Apr 22, 2013 12:06 pm
by pavila
This should be fixed with last uploaded changes. Please, try the nighbuild from http://integration.openkm.com/6.2/ (will be generated tonight, so download tomorrow)

Re: TIF Images Not Previewing on 6.2.3 & 6.2.4-DEV

PostPosted:Tue Apr 23, 2013 5:10 pm
by DonWMason
Had a chance to download nightly build and run some tests. Now it builds the previews, but only for the first page. Checked the log file and saw the command used to build the PDF is this:
Code: Select all
/usr/bin/convert /opt/tomcat-7.0.27/temp/okm4381335623687702829.tiff[0] /opt/tomcat-7.0.27/repository/cache/pdf/5a7bed0b-e3db-4138-a7d3-87eb1cb28360.pdf
Should the preview only show the first page (the "[0]" portion of the command) or should/can it show the whole document (even if 25 pages long)? Most of my files are multi-page TIFFs.

Re: TIF Images Not Previewing on 6.2.3 & 6.2.4-DEV

PostPosted:Tue Apr 23, 2013 7:43 pm
by pavila
I'm not sure why has the [0]. Indeed this cause only the first page conversion...

Ok, I have found the reason: http://www.rubblewebs.co.uk/imagemagick/psd.php

EDITED: I have uploaded a fix, so try the night build (again).