Page 1 of 1

the preview is not working

PostPosted:Thu Dec 20, 2012 6:45 am
by edwsin
hi,
I tried to view the document, but it generated an error like below.

Could you please tell me what could be the problem is...?

B. Regads,
Edward

Re: the preview is not working

PostPosted:Fri Dec 21, 2012 3:36 am
by edwsin
anyone can help me please :(

Re: the preview is not working

PostPosted:Fri Dec 21, 2012 7:50 am
by dejanfc

Re: the preview is not working

PostPosted:Sat Dec 22, 2012 6:27 am
by edwsin
dejanfc wrote:Did you install pdf2swf?

http://wiki.openkm.com/index.php/Applic ... conversion
hi i installed it on windows xp, does this also applicable for windows machine..?

Re: the preview is not working

PostPosted:Mon Dec 24, 2012 5:14 pm
by jllort
Which is your system.pdf2swf configuration parameter and which error appears at server.log

Re: the preview is not working

PostPosted:Wed Dec 26, 2012 3:43 am
by edwsin
jllort wrote:Which is your system.pdf2swf configuration parameter and which error appears at server.log
hi apperently i don't know where is the pdf2swf configuration parameter located :(
Could you kindly tell me where i can find it...? :)

Re: the preview is not working

PostPosted:Wed Dec 26, 2012 8:47 am
by edwsin
i entered this parameter into the: system.swftools.pdf2swf=/usr/bin/pdf2swf -T 9 -f ${fileIn} -o ${fileOut}
system.swftools.pdf2swf

And when i tried to open the pdf, it gives different error:

Re: the preview is not working

PostPosted:Wed Dec 26, 2012 9:14 am
by edwsin
can someone help me...? :(

Re: the preview is not working

PostPosted:Thu Dec 27, 2012 10:27 am
by jllort
do you really got /usr/bin/pdf2swf into this path ?
You can user other parameters like pdf2swf -f -T 9 -t -s storeallcharacters ${fileIn} -o ${fileOut}
Which error appear in your log ?

Re: the preview is not working

PostPosted:Fri Dec 28, 2012 1:59 am
by edwsin
jllort wrote:do you really got /usr/bin/pdf2swf into this path ?
You can user other parameters like pdf2swf -f -T 9 -t -s storeallcharacters ${fileIn} -o ${fileOut}
Which error appear in your log ?
hi, yes i have it, please see on the image below:
the pdf2swf location on my installation
the pdf2swf location on my installation
screenshot.32.jpg (90.91 KiB) Viewed 7683 times
I also tried to entered the parameters like u gave me, but it gave me an error:
error with new parameters
error with new parameters
screenshot.33.jpg (51.76 KiB) Viewed 7683 times
Here is the log that i found on the server:
the log server
the log server
screenshot.34.jpg (168.56 KiB) Viewed 7683 times
Where do i make mistake...? :(

Re: the preview is not working

PostPosted:Fri Dec 28, 2012 2:08 am
by edwsin
and this is the log from tomcat:
Code: Select all
2012-12-28 08:58:05,016 [http-bio-0.0.0.0-8080-exec-9] ERROR com.openkm.servlet.frontend.ConverterServlet - IO exception executing command: pdf2swf -f -T 9 -t -s storeallcharacters C:\openkm-6.2.1-community\tomcat\temp\okm195314473510642452
6.pdf -o C:\openkm-6.2.1-community\tomcat\repository\cache\swf\8123abbb-b2e3-48a6-b134-830defc1efd5.swf
com.openkm.core.ConversionException: IO exception executing command: pdf2swf -f -T 9 -t -s storeallcharacters C:\openkm-6.2.1-community\tomcat\temp\okm1953144735106424526.pdf -o C:\openkm-6.2.1-community\tomcat\repository\cache\swf\8123abbb
-b2e3-48a6-b134-830defc1efd5.swf
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:474)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:229)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:121)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.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.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Cannot run program "pdf2swf": CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
        at com.openkm.util.ExecutionUtils.runCmdImpl(ExecutionUtils.java:256)
        at com.openkm.util.ExecutionUtils.runCmd(ExecutionUtils.java:236)
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:464)
        ... 42 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
        ... 45 more

Re: the preview is not working

PostPosted:Fri Dec 28, 2012 8:20 am
by edwsin
please lock this thread, as i solved my issue, the problem was:
1. i did not installed the swftools
2. located the pdf2swf is not correctly written in the parameter

Thank you guys,
edward

Re: the preview is not working

PostPosted:Sat Dec 29, 2012 11:30 am
by jllort
You're using pdf2swf which comes with tomcat -> but this can only be used under linux OS. You should install swftools http://www.swftools.org/ which comes with pdf2swf for windows