Cannot preview images

Problems with installing LogicalDOC? No problems, the solution is closer than you think.

Moderator: car031

ccbaxter
Posts: 2
Joined: Sat Aug 13, 2011 7:45 pm

Cannot preview images

Sat Aug 13, 2011 8:01 pm

Hi,

I have just installed the LogicalDOC CE 6.2 in Ubuntu 10.04 but I cannot preview images. This is what I get in the log:

java.io.IOException: Error in IMG to PDF conversion
at com.logicaldoc.web.DocumentPreview.img2pdf(DocumentPreview.java:275)
at com.logicaldoc.web.DocumentPreview.document2swf(DocumentPreview.java:245)
at com.logicaldoc.web.DocumentPreview.createPreviewResource(DocumentPreview.java:166)
at com.logicaldoc.web.DocumentPreview.doGet(DocumentPreview.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.logicaldoc.web.CharsetFilter.doFilter(CharsetFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.logicaldoc.web.SessionFilter.doFilter(SessionFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
at com.logicaldoc.web.DocumentPreview.img2pdf(DocumentPreview.java:263)
... 30 more

I don't have any "img2pdf" in my system and googling around I was not able to find such a command.

Anyone knows if there is a package that came with that command ?

The thing is that version 6.1 worked fine previewing images, maybe I should get back to that version until 6.2 is more tested or at least more documented. Any clues ?

Regards.
mmeschieri
Posts: 242
Joined: Mon Apr 19, 2010 3:40 pm

Re: Cannot preview images

Tue Aug 16, 2011 8:28 am

Speacking about the latest release 6.2.3, you need some external command.

GhostScript
ImageMagik
SWFTools

once installed you have to configure them into the file context.properties (look at command.xxx properties)
ccbaxter
Posts: 2
Joined: Sat Aug 13, 2011 7:45 pm

Re: Cannot preview images

Tue Aug 16, 2011 9:39 am

Hi, I have those packages in my system and these paths in context.properties:

command.convert=/usr/bin/convert
command.pdf2swf=/usr/bin/pdf2swf
command.gs=/usr/bin/gs

But the window preview stills empty and I see these errors in the log

WARN com.logicaldoc.core.document.thumbnail.ThumbnailManager No registered thumbnail for extension JPG
ERROR com.logicaldoc.core.store.FSStorer /opt/logicaldoc/repository/docs/1/doc/1.0-thumb.jpg (No such file or directory)
ERROR com.logicaldoc.web.DocumentPreview Error in IMG to PDF conversion
ERROR com.logicaldoc.core.store.FSStorer /opt/logicaldoc/repository/docs/1/doc/1.0-preview.swf (No such file or directory)
agaspa
Posts: 709
Joined: Tue Apr 20, 2010 8:24 am

Re: Cannot preview images

Wed Sep 28, 2011 9:49 am

Yes, I must tell you that this is a known problem.
The problem is the file extension .JPG and in detail is related to the case of the extension.
If the extension is in lower case the preview is created correctly otherwise if the extension is in upper case an error occurs in creating the preview.

This has been corrected in the logicaldoc trunk (LD 6.3) and in the 6.2 branch (LD 6.2.5)

Return to “Installation”

Who is online

Users browsing this forum: No registered users and 1 guest