Page 1 of 1

.tif Image Preview Not Working

PostPosted:Fri Feb 01, 2013 1:46 pm
by Muhammad Imran
Hi,
I have installed OpenKM 6.2.2 on windows 7. I have configured it to replace HSQLDB with MySQL. Right now, in OpenKM all .png .jpg .docx .txt etc. preview is working well except .tif images.

On alert dialog box I can see the following 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
On the console window I can see the following Error:
Code: Select all
2013-02-01 18:36:03,100 [http-bio-0.0.0.0-8080-exec-5] WARN  com.openkm.util.Exe
cutionUtils - Abnormal program termination: 1
2013-02-01 18:36:03,101 [http-bio-0.0.0.0-8080-exec-5] WARN  com.openkm.util.Exe
cutionUtils - CommandLine: [C:\tomcat\bin\SWFTools\pdf2swf.exe, -T, 9, -f, C:\to
mcat\repository\cache\pdf\5f603b29-02b3-456e-b42e-0b1c4ecb49df.pdf, -o, C:\tomca
t\repository\cache\swf\5f603b29-02b3-456e-b42e-0b1c4ecb49df.swf]
2013-02-01 18:36:03,101 [http-bio-0.0.0.0-8080-exec-5] WARN  com.openkm.util.Exe
cutionUtils - STDERR: 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

2013-02-01 18:36:03,103 [http-bio-0.0.0.0-8080-exec-5] ERROR com.openkm.servlet.
frontend.ConverterServlet - 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

com.openkm.core.ConversionException: Error: May not be a PDF file (continuing an
yway)
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table

        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:468)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.j
ava:267)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet
.java:127)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:311)
        at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.invoke(FilterSecurityInterceptor.java:116)
        at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.access.ExceptionTranslationFilter.do
Filter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.session.SessionManagementFilter.doFi
lter(SessionManagementFilter.java:101)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.authentication.AnonymousAuthenticati
onFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwar
eRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter
.doFilter(RequestCacheAwareFilter.java:45)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.authentication.AbstractAuthenticatio
nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.context.SecurityContextPersistenceFi
lter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:173)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
elegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
ingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:169)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:999)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:565)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:309)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:662)
Can any body please tell me how to resolve this problem?
Thanks in advance

Re: .tif Image Preview Not Working

PostPosted:Sun Feb 03, 2013 10:57 am
by jllort
Do you have imagemagick installed and configured in OpenKM configuration parameters.

Re: .tif Image Preview Not Working

PostPosted:Mon Feb 04, 2013 5:32 am
by Muhammad Imran
yes, I have installed the imagicmagic and configured its paramenter in OpenKM configuration as follow

system.imagemagick.convert
C:\tomcat\bin\ImageMagick-6.8.1-Q16\convert.exe

I have also checked in the admin -> config -> chek
the screen shoot is available at the follwoing url:

http://postimage.org/image/nppawbyvf/

Re: .tif Image Preview Not Working

PostPosted:Thu Feb 07, 2013 6:23 pm
by jllort
Can you test in our online demo ? could be some problem with the pdf

Re: .tif Image Preview Not Working

PostPosted:Fri Feb 08, 2013 5:38 am
by Muhammad Imran
Yes I have tested dog.tif image in OpenKM online demo. The preview of my test image dog.tif is working well.
I have installed OpenKM 6.2.2 on windows 7 and configured it to MySQL.
On my local machine the preview of all other documents is working well except .tif images.
On my local machine I can see the following error in the dialog box.
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
My test imgae dog.tif is as follow:

Image

I have also checked in the administration -> configuration -> configuration chek
My OpenKM configurations are also OK as shown below:

Image

Plz tell me if I am missing some thing or there is any other technical problem?

Re: .tif Image Preview Not Working

PostPosted:Sat Feb 09, 2013 9:28 am
by jllort
Try in your system the command:
Code: Select all
convert *.tif imagenes.pdf 
And see if pdf is right or not

Re: .tif Image Preview Not Working

PostPosted:Mon Feb 11, 2013 7:21 am
by Muhammad Imran
Hi jllort,
I have tried the following code:
Code: Select all
convert *.tif imagenes.pdf
It gave me the following error and also converted the dog.tif into dog.pdf. I can open and read the dog.pdf document.
Code: Select all
C:\tomcat\bin\ImageMagick-6.8.1-Q16>convert dog.tif dog_tif.pdf
convert.exe: Unknown field with tag 20752 (0x5110) encountered. `TIFFReadDirecto
ry' @ warning/tiff.c/TIFFWarnings/824.
convert.exe: Unknown field with tag 20753 (0x5111) encountered. `TIFFReadDirecto
ry' @ warning/tiff.c/TIFFWarnings/824.
convert.exe: Unknown field with tag 20754 (0x5112) encountered. `TIFFReadDirecto
ry' @ warning/tiff.c/TIFFWarnings/824.
My test tif image dog.tif is as follow:
Image

Re: .tif Image Preview Not Working

PostPosted:Tue Feb 12, 2013 3:59 pm
by jllort
I suggest you post the question in imagemagick forum sure there you'll get better information than in this forum.