【文件属性】:
文件名称:pdf2swf将PDF转换成SWF
文件大小:21.4MB
文件格式:ZIP
更新时间:2021-01-18 10:30:38
pdf2swf
将PDF转换成SWF可以使用SWFTools工具中的pdf2swf(http://www.swftools.org/),1、首先下载安装,一直默认下一步即可。
2、java代码:
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
public class TestPdf2Swf {
public static int convertPDF2SWF(String sourcePath, String destPath,
String fileName) throws IOException {
// 目标路径不存在则建立目标路径
File dest = new File(destPath);
if (!dest.exists())
dest.mkdirs();
// 源文件不存在则返回
File source = new File(sourcePath);
if (!source.exists())
return 0;
// 调用pdf2swf命令进行转换
String command = "C:\\SWFTools\\pdf2swf.exe" + " " + sourcePath+ " -o "
+ destPath + fileName + " -f -T 9";
System.out.println(command);
Process pro = Runtime.getRuntime().exec(command);
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(pro.getInputStream()));
while (bufferedReader.readLine() != null);
try {
pro.waitFor();
} catch (InterruptedException e) {
e.printStackTrace();
}
return pro.exitValue();
}
/**
* @param args
*/
public static void main(String[] args) {
String sourcePath = "D:\\springFramework.pdf"; //源文件路径
String destPath = "D:\\"; //目标路径
String fileName = "springFramework.swf"; //生成文件名
try {
TestPdf2Swf.convertPDF2SWF(sourcePath, destPath, fileName);
} catch (IOException e) {
e.printStackTrace();
}
}
}
【文件预览】:
font2swf.exe
jpeg2swf.exe
swfbbox.exe
swfextract.exe
png2swf.exe
pdf2swf_gui.ico
pdf2swf_gui.exe
python25
----gfx.pyd(9.1MB)
python24
----gfx.dll(9.1MB)
as3compile.exe
swfstrings.exe
swfs
----default_loader.swf(12KB)
----simple_viewer.swf(505B)
----tessel_loader.swf(11KB)
----keyboard_viewer.swf(366B)
----default_viewer.swf(505B)
----rfxview.swf(5KB)
----swft_loader.swf(12KB)
----PreLoaderTemplate.swf(121B)
swfrender.exe
uninstall.exe
swfdump.exe
swfcombine.exe
python26
----gfx.pyd(9.1MB)
swfc.exe
rfxview.swf
gif2swf.exe
pdf2swf.exe
uninstall.ini
wav2swf.exe
网友评论
- 不错,是我想要的
- 棒棒哒,很好用