将PDF转换为SWF [英] Converting PDF to SWF
问题描述
使用swftool.org进行转换。
在我的convertion im中,还将输出swf与我的查看器使用cmd结合在一起
pdf2swf Note.pdf -o Note.swf -B viewer.swf
我的代码在CONSOL以及开发模式下都可以正常使用,但是在swf的托管模式输出文件没有与我的viewer.swf
结合使用默认的swf格式
这里是我的代码::
class swfconvertor
{
字符串转换器(String kk,String pathname_dir,String newSWFfilename)
{
String s9 =;
尝试
{
运行时Re = null;
Re = Runtime.getRuntime();
System.out.println(bharat 1);
//Re.exec(\"chmod 777 test1.sh);
进程s = Re.exec(/ usr / local / bin / test1.sh);
synchronized(s)
{
s.wait(20000);
}
System.out.println(bharat 2);
BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
System.out.println(buffer+ br.readLine());
System.out.println(buffer+ br.readLine());
System.out.println(buffer+ br.readLine());
System.out.println(buffer+ br.readLine());
s9 = br.readLine();
catch(Exception e)
{
System.out.println(e.toString());
s9 = e.toString();
}
return s9;
$ / code $ / pre
在test1.sh我的转换代码存在是:
$ $ p $ #!/ bin / sh
/usr/share/apache-tomcat-6.0.37/webapps/ROOT/file/pdf2swf /usr/share/apache-tomcat-6.0。 37 / webapps / ROOT / file / c8fpB5eGNR.pdf -o /usr/share/apache-tomcat-6.0.37/webapps/ROOT/file/funn.swf -B /usr/share/apache-tomcat-6.0.37/ webapps / ROOT / file / viewer.swf
我的问题是我的代码在GWT的开发模式下都能正常工作,在终端上。但是,不要在托管模式下提供预期的输出(当我在apache-tomcat-6.0.37 / webapps / ROOT / server上部署它时)。
谢谢你的同类利息... !!!
问题是由于在单个进程中执行多个命令。
在我的test1.sh中有两个命令同时执行。
由于输入到第二个命令的第一个命令的输出没有生成,所以我无法得到想要的结果。
我推荐执行一个命令。
感谢和问候
I m trying to convert pdf to swf on Linux using Gwt. For convertion i m using swftool.org.
In my convertion i m also combining the output swf with my viewer using cmd
pdf2swf Note.pdf -o Note.swf -B viewer.swf
my code is wokring properly at consol as well as in development mode but at hosted mode output file of swf is not combined with my viewer.swf It comes in the default swf form
here is my code ::
class swfconvertor
{
String convertor(String kk, String pathname_dir, String newSWFfilename)
{
String s9="";
try
{
Runtime Re=null;
Re = Runtime.getRuntime();
System.out.println("bharat 1");
//Re.exec("chmod 777 test1.sh");
Process s = Re.exec("/usr/local/bin/test1.sh");
synchronized (s)
{
s.wait(20000);
}
System.out.println("bharat 2");
BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
System.out.println("buffer "+br.readLine());
System.out.println("buffer "+br.readLine());
System.out.println("buffer "+br.readLine());
System.out.println("buffer "+br.readLine());
s9=br.readLine();
}
catch(Exception e)
{
System.out.println(e.toString());
s9=e.toString();
}
return s9;
}
}
in test1.sh my code for convertion is present which is as ::
#!/bin/sh
/usr/share/apache-tomcat-6.0.37/webapps/ROOT/file/pdf2swf /usr/share/apache-tomcat-6.0.37/webapps/ROOT/file/c8fpB5eGNR.pdf -o /usr/share/apache-tomcat-6.0.37/webapps/ROOT/file/funn.swf -B /usr/share/apache-tomcat-6.0.37/webapps/ROOT/file/viewer.swf
My Problem is that my this code is working properly in both development mode of GWT as well as on terminal. But do not provide expected output on hosted mode(when i deploy it on apache-tomcat-6.0.37/webapps/ROOT/ server).
Thank you for your kind interest...!!!
The problem was due to execution of multiple commands in single process. In my test1.sh there are two commands executing at same time. Due to which output of the first command which is input to second command is not generated and I was unable to get desired result.
I recommend to execute one command at a time.
Thanx and Regards
这篇关于将PDF转换为SWF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!