#word转成pdf
#程序:刘兴
#时间:2010.3.19
#blog:http://deepfuture.iteye.com
#QQ:782322192
use warnings;
use strict;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Word';
my $word = CreateObject Win32::OLE 'Word.Application' or die $!;
#作者blog:http://deepfuture.iteye.com/
$word->{'Visible'} = 1;
my $document = $word->Documents->Open('D:\深未来\测试\xxx.doc');
my $pdffilename = 'D:\深未来\测试\xxx.pdf';
$document->saveas({FileName=>$pdffilename,FileFormat=>wdExportFormatPDF});
$word->quit();
本文介绍了一种使用Perl脚本来将Microsoft Word文档转换为PDF格式的方法。通过调用Win32::OLE模块来操作Word应用程序并导出PDF文件。该方案适用于自动化文档转换流程。

被折叠的 条评论
为什么被折叠?



