我无法使用 perl(草莓)和 win32::ole 使用 powerpoint(来自 office2010)将 ppt(x) 转换为 pdf。
我可以使用 Export 函数很好地导出为 jpg,但ExportAsFixedFormat函数的语法非常晦涩,而且总是给我
Win32::OLE(0.1709) error 0x80020011: "Does not support a collection"
。
这是我正在尝试的示例
my $ppoint = Win32::OLE->new('PowerPoint.Application', 'Quit');
my $Presentation = $ppoint->Presentations->Open("$infile") || die("Una +ble to open document ", Win32::OLE->LastError()) ;
$Presentation->ExportAsFixedFormat("$outfile", 2, 2, "msoCTrue", "ppPrintHandoutHorizontalFir +st", "ppPrintOutputFourSlideHandouts", "msoFalse", "", "" , "", "Fals +e", "False", "False", "False", "False");
第二个参数ppFixedFormatTypePDF应该是 2
第三个参数 'ppFixedFormatIntentPrint' 应该是 2
任何人都可以提出一个可行的例子吗?