把pdf文件转化成word,excel,powerpoint,html文件的软件2006/11/06 13:50abl2extract is a powerful pdf conversion tool that lets users convert their pdf data into formatted excel spreadsheets, editable word documents, powerpoint presentations, html and more. a2e has its own proprietary pdf viewer that allows users to select exactly what they want to convert. our custom excel conversion option lets users graphically designate how they want their pdf data converted into excel. this feature is simple to use and ensures perfect conversions into excel everytime. a2e also has 10 other conversion options available for converting other formats.version 4 improved pdf to word conversion quality; added pdf to powerpoint conversion; pdf is converted to html using css so that both graphics and text are converted over; updated user interface; added the ability to convert pdf tables into a designated cell in an existing excel document.
下载地址:
http://downloads.zdnet.com/download.aspx?&scname=word+processing+-+business+-+windows&docid=210274
序列号:5302-7442-1317
solid pdf converter ( pdf 转 word )多国语言版 注册码2006/11/08 10:52solid converter pdf是一套专门将pdf文件转换成doc的软件,除了转换成doc文件外,还可以转换成rtf以及word xml文件。除此之外,它还有一个图片撷取功能,可以让我们将pdf档里的图片撷取出来,以及将pdf档里的表格撷取出来,并输出到excel里,方便我们编辑表格里的资料。
下载地址:
1.
http://www.onlinedown.net/soft/37438.htm
2.
http://www.solidpdf.com/download.htm
3.
http://downloads.zdnet.com/download.aspx?&kw=solid+pdf+converter&docid=217320
注册信息如下: 没列出来的自己随便填.
e-mail : top@toptpe.com
serial: dwwv
或
e-mail : iloveu@toptpe.com
serial: mnpr
或
e-mail : jason@toptpe.com
serial: zwfc
希望用的愉快.!
1.office组件把pdf转成word:
可以利用office 2003中的microsoft office document imaging组件来实现
pdf转word文档,也就是说利用word来完成该任务。方法如下:
用adobe reader打开想转换的pdf文件,接下来选择“文件→打印”菜单,在打开的“打印”窗口中将“打印机”栏中的名称设置为“microsoft office document image writer”,确认后将该pdf文件输出为mdi格式的虚拟打印文件。
注:如果没有找到“microsoft office document image writer”项,使用office 2003安装光盘中的“添加/删除组件”更新安装该组件,选中“office 工具 microsoft draw转换器”。
然后,运行“microsoft office document imaging”,并利用它来打开刚才保存的mdi文件,选择“工具→将文本发送到word”菜单,在弹出的窗口中选中“在输出时保持图片版式不变”,确认后系统会提示“必须在执行此操作前重新运行ocr。这可能需要一些时间”,不管它,确认即可。
注:对pdf转doc的识别率不是特别完美,转换后会丢失原来的排版格式,所以转换后还需要手工对其进行排版和校对工作。
以上仅在word2003中可用,其他版本没有microsoft office document image writer。
2.利用第三方工具软件:
scansoft pdf converter for microsoft word
下载地址:
http://www.mydown.com/soft/245/245551.html
3.asp.net实现将word转换pdf格式:
一:必备工具
安装必须的工具ms vs.net2003,ms office2003,adobe acrobat 7.0 professional,postscript.exe,gs811w32.exe
ms vs.net2003的安装不说明
ms office2003的安装不说明
adobe acrobat 7.0 professional安装说明
运行setup.exe文件,出现输入序列号,就运行注册机,用鼠标在第一行刷下就可以看见序列号,复制粘贴到adobe acrobat 7.0 professional安装程序对话框,安装到最后出现注册时,点击phone...将安装程序中显示的第二行序列号(第一行是刚才注册机生成的序列号)复制粘贴到注册机的第二行,点击右边的按钮,再用鼠标刷第三行授权号就出来了,将其复制粘贴到安装程序的最后一行,完成安装注册!
postscript.exe默认安装就可以了,它是一个pdf转换时所需要的脚本
gs811w32.exe默认安装就可以,它其实是个pdf虚拟打印机的驱动
二:配置虚拟打印机
进入windows的控制面板,进入打印机,点击"添加打印机"图标.在安装对话框上"按一步",出现选择打印机时,在制造商一栏中选择"generic",在打印机一栏中,选择"ms publisher color printer",然后一路按下一步,知道安装结束.
三:开始写第一个程序(脚本程序)
为什么要使用脚本程序进行转换呢,其实实际测试过程中,使用pdf distiller的对象引用到c#后,转换成功,但整个pdf distiller对象不能释放,第二次再转换时,就发生了错误,故此处使用脚本程序实现转换.这样我们只要在c#的程序中调用脚本程序就可以实现word到pdf的转换。
宿主脚本文件名:convertdoc2pdf.js
脚本文件内容:
var files = wscript.arguments;
var fso = new activexobject("scripting.filesystemobject");
var word = new activexobject("word.application");
var pdf = new activexobject("pdfdistiller.pdfdistiller.1");
word.activeprinter = "ms publisher color printer";
//files(0) 为word文档文件名
//files(1) 为,转换后需要保存的路径
//调用fso.getbasename(files(0))后,为无路径,无扩展名,的文件名
//files.length为文件参数的个数,使用循环可以支持多个word文档的转换
var docfile = files(0);
var psfile = files(1) + fso.getbasename(files(0)) + ".ps";
var pdffile = files(1) + fso.getbasename(files(0)) + ".pdf";
var logfile = files(1) + fso.getbasename(files(0)) + ".log";
try{
var doc = word.documents.open(docfile);
//word文件转成ps文件;
word.printout(false, false, 0, psfile);
doc.close(0);
//ps文件转成pdf文件;
pdf.filetopdf(psfile,pdffile,"");
fso.getfile(psfile).delete();//删除ps脚本文件
fso.getfile(logfile).delete();//删除转换的日志文件
word.quit();
wscript.echo("isuccess");//成功
wscript.quit(0);
}
catch(x)
{
word.quit();
wscript.echo("isfail");//失败
wscript.quit(0);
}
然后测试该脚本程序
启动ms-dos,输入如下命令:
c:\>cscript //nologo c:\convertdoc2pdf.js c:\test.doc c:\
说明:
运行成功后将看到test.pdf文档了
c:\test.doc参数对应的是脚本程序中的files(0)
c:\参数对应的是脚本程序中的files(1)
你可以安照该脚本改写成,支持多个参数,使用for循环,一次转换多个word文档,此处没有使用多个文件转换功能,是考虑到,该段脚本放在c#的线程中执行,这样一来也可以转换多个word文档.
四:使用c#调用convertdoc2pdf.js脚本
新建一个c#的windows应用程序,添加一个按钮button1
添加一个函数,函数名startconvertpdf
public void startconvertpdf()
{
process proc = new process();
proc.startinfo.filename = "cmd.exe";
proc.startinfo.workingdirectory = @"c:\";
proc.startinfo.createnowindow = true;
proc.startinfo.useshellexecute = false;
proc.startinfo.redirectstandardinput = true; //输入重定向
proc.start();
proc.standardinput.writeline(@"cscript //nologo c:\convertdoc2pdf.js c:\test.doc c:\");
proc.standardinput.writeline("exit");
proc.waitforexit();
}
然后在按钮的click事件中添加调用线程的代码
private void button1_click(object sender, system.eventargs e)
{
//定义线程序
thread thconvert = new thread(new threadstart(startconvertdata));
thconvert.start();
}
注意:在测试上面的c#程序时,必须添加如下命名空间
using system.diagnostics;
using system.threading;
五:健壮的c#调用代码(实际考虑,可放在b/s系统中)
完成第4步的c#测试后,细心的读者,可能看到一点问题,那就是如何得到脚本运行后输出的结果,如何给线程中调用的startconvertdata方法传递参数
1:传递参数,此话说来也可用一篇教程告诉大家线程中方法如何来传递参数,现在就讲一个方案,此种方案很多,我采用一个类,初始化这个类,然后调用该类的方法作为线程执行的方法
2:得到脚本的输出结果,使用process对象的输出重定向,就是说改变输出方向,使脚本不输出到控制台(ms-dos窗口),而是重定向输出到c#程序中,并采用线程的异步回调方法,显示脚本运行结果。
添加一个新类,类名为topdf
using system;
using system.diagnostics;
using system.componentmodel;
using system.windows.forms;
using system.data;
namespace doc2pdf
{
public class topdf
{
private string strword = "";//此处的word文件不含路径
private string spath = "";
public string sexecresult = "";
public bool bsuccess = false;
public topdf(string sparamword,string sparampath)
{
strword = sparamword;
spath = sparampath;
}
public void startconvertpdf()
{
process proc = new process();
proc.startinfo.filename = "cmd.exe";
proc.startinfo.workingdirectory = spath;
proc.startinfo.createnowindow = true;
proc.startinfo.useshellexecute = false;
proc.startinfo.redirectstandardinput = true;//标准输入重定向
proc.startinfo.redirectstandardoutput = true;//标准输出重定向
proc.start();
proc.standardinput.writeline("cscript //nologo "+spath+"convertdoc2pdf.js "+spath+strword+ " "+spath);
proc.standardinput.writeline("exit");
sexecresult = proc.standardoutput.readtoend();//返回脚本执行的结果
proc.waitforexit();
proc.close();
}
public void endconvertpdf(system.iasyncresult ar)//ar参数必须写,是线程执行完成后的回调函数
{
if(sexecresult.indexof("isuccess")!=-1)bsuccess=true;
else if(sexecresult.indexof("isfail")!=-1)bsuccess=false;
//如果放在b/s系统,你可以在此处写数据库,是成功还是失败,并用一个webservice程序不断检查数据库,此webservice程序不放在该回调用函数中
//如果放在c/s系统,回调函数可以不放在类中,以便在窗体程序中调用结果
}
}
}
改写原来的button1_click事件中的代码
private void button1_click(object sender, system.eventargs e)
{
topdf my2pdf = new topdf("test.doc","c:\\");
threadstart thstartconvert = new threadstart(my2pdf.startconvertpdf); //开始异步调用线程
thstartconvert.begininvoke(new asynccallback(my2pdf.endconvertpdf),null);//设置异步线程的回调函数
//如果需要转换多个word,你可以用循环
//如果是b/s系统,可以将本段代码放在aspx中,并结合客户端的无刷新显示数据的技术,不断访问webservice程序,以确定pdf是否转换成功或失败
}
六:编写更加健壮的c#调用代码(实际考虑,可放在windows的服务程序中)
实际使用时,由于转化pdf时cpu的占用率很高,考虑只在同一时间转换一篇word文档,放弃异步线程的回调函数的使用,考虑一个windows的服务程序。
写一个函数checkdata2convert(),不断的检查没有转换的word文档,并使用循环调用topdf类中执行转换方法startconvertpdf
//以下给出,泛代码,用户按照自己的需求,填写完整即可
//bool bstart为全局变量,控制循环的进入与退出
//例:18:30开始检查并转换,那么18:30时,bstart=true;并启动转换线程
//6:30停止转换线程,bstart=fasle;
private void checkdata2convert()
{
//检查指定目录下的没有转换的word文档,你同样可以检查数据库中记录的没有转换的word文档
string spath = system.threading.thread.getdomain().basedirectory; //当前的路径
while(bstart)
{
int ifilecount = checkword(); //checkword为一个方法,检查当前没有转换的word文档,返回没有转换的文件数,该方法的代码由读者自己编写
for(int i=0;i<ifilecount;i++)
{
string sword = getwordfilename(i) //getwordfilename为一个方法,返回一个不带路径的word文件名,该方法的代码由读者自己编写
//topdf类中的startconvertpdf()方法使用的是不带路径的word文件名
topdf my2pdf = new topdf(sword ,spath);
my2pdf.startconvertpdf();
if(my2pdf.sexecresult.indexof("isuccess")!=-1)
{
//成功,写日志,或回写数据库
}
else if(my2pdf.sexecresult.indexof("isfail")!=-1)
{
//失败,写日志,或回写数据库
}
}
if(!bstart)break;
thread.sleep(1000);
}
}
然后在服务的开始事件中,启动线程
protected override void onstart(string[] args)
{
//可以使用一个开始定时器,检查是否到开始时间,时间一到,就开始执行线程,此处的开始执行线程可以放在开始定时事件中
//可以使用一个结束定时器,检查是否到结束时间,时间一到,就结束线程,结束线程的代码可以放在结束定时事件中
//注意:应该使用组件中的定时器,而不是windows的forms中的定时器
//该定时器的类名为system.timers.timer,千万别搞错,不然执行不会正常的
bstart = true;
thread thconvert = new thread(new threadstart(startconvertdata));
thconvert.start();
}
然后在服务的结束事件中,设置停止线程的标识bstart= false
protected override void onstop()
{
bstart = false;
//为何次处不停止线程呢,因为考虑到,现在线程正在转换word文档,但没有结束,所以只设置停止标识,转换完成后,线程也执行结束了.
}