• Auto Preview

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #13987  by matt@theforce
 
Hi,

I'm not only new to OpenKM but I am also new to Unix & have been asked to build a Wiki for our support team to use.

So far everything seems to have installed correctly, all except Auto Preview work for our testing purposes :(

I have installed
OpenKM 5.1.9
freetype 2.4.8
swftools 0.9.1
xpdf 3.03
Imagemagick 6.7.4-6
Centos 6.1 (Office Production ticked @ install)

I'm unsure what files you will need to help me diagnose what I have missed/not configured correctly so for now I have attached a copy of the logfile from when I was last on shift and able to look into this.

I have done a search and found various other threads about the same problem but those solutions haven't helped me get mine to work.

Many Thanks
Matthew
Attachments
(90.03 KiB) Downloaded 333 times
 #14003  by pavila
 
This server has no Internet connection, as far I can see in the log file (Connection timed out). Take a look at http://wiki.openkm.com/index.php/Proper ... definition to solve it.

Also I can see you have a problem with the OpenOffice integration, because:
Code: Select all
Caused by: java.lang.NullPointerException
	at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:75)
	at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:66)
	at com.openkm.util.DocConverter.convert(DocConverter.java:251)
	at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
But I can't know why it is happening.
 #14238  by matt@theforce
 
I think I'm making some progress. Would I be correct in thinking I have an issue with the install of pdf2swf?
Code: Select all
2012-03-01 15:10:42,221 ERROR [com.openkm.servlet.frontend.ConverterServlet] IO exception executing command: /usr/bin/pdf2swf -T 9 -f /tmp/okm5721188889159079605.pdf -o /opt/jboss-4.2.3.GA/cache/swf/db40e9f4-3509-4ee1-ac0e-f4fa8be6d5b9.swf
com.openkm.core.ConversionException: IO exception executing command: /usr/bin/pdf2swf -T 9 -f /tmp/okm5721188889159079605.pdf -o /opt/jboss-4.2.3.GA/cache/swf/db40e9f4-3509-4ee1-ac0e-f4fa8be6d5b9.swf
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:535)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:223)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:106)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        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:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: Cannot run program "/usr/bin/pdf2swf": java.io.IOException: error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
        at com.openkm.util.ExecutionUtils.runCmdImpl(ExecutionUtils.java:246)
        at com.openkm.util.ExecutionUtils.runCmd(ExecutionUtils.java:225)
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:525)
        ... 22 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
        at java.lang.ProcessImpl.start(ProcessImpl.java:81)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
 #14268  by jllort
 
Error is clear, indicates that the file in your server path not exists.

Cannot run program "/usr/bin/pdf2swf": java.io.IOException: error=2,
 #14276  by vkasgpta
 
hello,
im having an issue with auto preview as well... belows the log:
Code: Select all
15:05:20,406 ERROR [ConverterServlet] Error in application/vnd.ms-excel to PDF conversion
com.openkm.core.ConversionException: Error in application/vnd.ms-excel to PDF conversion
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:311)
        at com.openkm.servlet.frontend.ConverterServlet.toPDF(ConverterServlet.java:188)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:225)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:106)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        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:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: this OfficeManager is currently stopped
        at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.execute(ProcessPoolOfficeManager.java:67)
        at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:75)
        at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:66)
        at com.openkm.util.DocConverter.convert(DocConverter.java:251)
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
        ... 23 more
How to i 'start' office manager..?

thx!!
 #14300  by pavila
 
If you have properly set the "system.openoffice.path" configuration property, OpenKM will start OpenOffice / LibreOffice automatically when needed.
 #14330  by vkasgpta
 
thx for the reply pavila :)

well my setting has a string of this value:
D:\jboss-4.2.3.GA\lib\openoffice

i have installed the openoffice in
D:\jboss-4.2.3.GA\lib\openoffice\

same thing for the pdf2swf, its in the lib folder of jboss

i have tried changing the path to
D:\jboss-4.2.3.GA\lib\openoffice\
(added the \) but still no dice :(
 #14361  by vkasgpta
 
done :)
i have attached the log

hopefully i followed it right.. ><
Attachments
(125.39 KiB) Downloaded 294 times
 #14387  by matt@theforce
 
After endless hours of changing bits & pieces I decided it was time to rebuild the server to start from a default install. I still had the same issue, Document preview wouldn't work with any file format.

I've managed to get .pdf / .doc / .xls / .xlsx working but still have problems with .docx / .ppt / .pptx / .txt / .jpg
For now my primary concern is .docx, I've un-installed OpenOffice (that came with Centos) and installed LibreOffice 3.5 but get the following error when trying to auto preview a .docx file
Code: Select all
2012-03-08 15:44:12,146 ERROR [com.openkm.servlet.frontend.ConverterServlet] Error in application/vnd.openxmlformats-officedocument.wordprocessingml.document to PDF conversion
com.openkm.core.ConversionException: Error in application/vnd.openxmlformats-officedocument.wordprocessingml.document to PDF conversion
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:311)
        at com.openkm.servlet.frontend.ConverterServlet.toPDF(ConverterServlet.java:188)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:225)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:106)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        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:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.IllegalStateException: this OfficeManager is currently stopped
        at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.execute(ProcessPoolOfficeManager.java:67)
        at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:75)
        at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:66)
        at com.openkm.util.DocConverter.convert(DocConverter.java:251)
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
        ... 23 more
 #14394  by vkasgpta
 
that looks like the same error message im facing!
im using open office though... :|
 #14421  by pavila
 
vkasgpta wrote:done :)
i have attached the log
After review the log, I have two questions:

- Do you have any application running attached to the 2002 port?
- There is a "program/soffice.bin" file inside "D:\jboss-4.2.3.GA\lib\openoffice\" ?
 #14424  by matt@theforce
 
I've checked everything on the link provided, even removing settings on the system.openoffice.xxxxx but still no avail

I've cleared the server.log and done a start of OpenKM & tried the AutoPreview for docx/ppt/pptx/txt (in that order) to show the errors more clearly.

doc/pdf/xls/xlsx still work in AutoPreview

Here is my config
Code: Select all
system.ghostscript.ps2pdf String /usr/local/bin/pdf2swf       
system.imagemagick.convert String /usr/local/bin/convert       

system.openoffice.dictionary String       
system.openoffice.path String /opt/libreoffice3.5       
system.openoffice.port Integer 2222       
system.openoffice.server String       
system.openoffice.tasks Integer 5       
system.swftools.pdf2swf String /usr/local/bin/pdf2swf -T 9 -f ${fileIn} -o ${fileOut}     
Matthew
Attachments
(90.87 KiB) Downloaded 255 times

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.