⚠️注意:适用于macOS10.12、PowerPoint15.15以后版本。
macOS系统下使用Automator应用,编写一段简单的Workflow程序,即可实现Finder内的PPT文件一键转化为PDF。代码来源于国外论坛,但是实际使用的时候并非真正的“一键转换”,需要打开Automator应用、允许文件夹适用权限等等。这里提供自用的修改版本,十分方便。
1、编写Applescript脚本:
打开Automator应用,新建Workflow文件,编写代码如下,完成后保存:
on run {input, parameters}
tell application "PowerPoint"
launch
repeat with i in input
open i
set pdfPath to my makeNewPath(i)
save active presentation in pdfPath as save as PDF
close active presentation saving no
end repeat
quit
end tell
end run
on makeNewPath(f)
set t to f as string
if t ends with ".pptx" then
return (text 1 thru -5 of t) & "pdf"
else
return t & ".pdf"
end if
end makeNewPath
2、导出为Service:</