当前位置:我的异常网» Java Web开发 » linux系统,java语言,使用swftools将pdf转成swf解
linux系统,java语言,使用swftools将pdf转成swf解决思路
www.myexceptions.net 网友分享于:2014-06-09 浏览:13次
linux系统,java语言,使用swftools将pdf转成swf
系统已安装swftools,
在系统中执行命令
[weblogic@test nohuplogs]$ pdf2swf /weblogic/wls1036/第四部分线性代数.pdf /weblogic/wls1036/ekbsTest.swf
NOTICE processing PDF page 1 (595x841:0:0)
NOTICE File contains links
NOTICE processing PDF page 2 (595x841:0:0)
NOTICE File contains pbm pictures
NOTICE processing PDF page 3 (595x841:0:0)
NOTICE processing PDF page 4 (595x841:0:0)
NOTICE processing PDF page 5 (595x841:0:0)
NOTICE processing PDF page 6 (595x841:0:0)
NOTICE processing PDF page 7 (595x841:0:0)
NOTICE processing PDF page 8 (595x841:0:0)
NOTICE processing PDF page 9 (595x841:0:0)
NOTICE processing PDF page 10 (595x841:0:0)
NOTICE processing PDF page 11 (595x841:0:0)
NOTICE processing PDF page 12 (595x841:0:0)
NOTICE processing PDF page 13 (595x841:0:0)
NOTICE processing PDF page 14 (595x841:0:0)
NOTICE processing PDF page 15 (595x841:0:0)
NOTICE processing PDF page 16 (595x841:0:0)
NOTICE processing PDF page 17 (595x841:0:0)
NOTICE processing PDF page 18 (595x841:0:0)
NOTICE processing PDF page 19 (595x841:0:0)
NOTICE processing PDF page 20 (595x841:0:0)
NOTICE Writing SWF file /weblogic/wls1036/ekbsTest.swf
[weblogic@test nohuplogs]$
并且文件已经生成 ekbsTest.swf
问题,在java里面,调用java api
Process p = r.exec( "pdf2swf /weblogic/wls1036/第四部分线性代数.pdf /weblogic/wls1036/1ssss1.swf");
结果报错说
java.io.IOException: Cannot run program "pdf2swf": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at com.sinosoft.app.ekbs.web.ConvertServlet.doPost(ConvertServlet.java:52)
at com.sinosoft.app.ekbs.web.ConvertServlet.doGet(ConvertServlet.java:28)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
文章评论