我正在尝试使用PowerShell将Word Docx批量转换为PDF - 使用此站点上的脚本:http: //blogs.technet.com/b/heyscriptingguy/archive/2013/03/24/weekend-scripter -convert字的文档到PDF的文件与- powershell.aspx
# Acquire a list of DOCX files in a folder
$Files=GET-CHILDITEM "C:\docx2pdf\*.DOCX"
$Word=NEW-OBJECT –COMOBJECT WORD.APPLICATION
Foreach ($File in $Files) {
# open a Word document, filename from the directory
$Doc=$Word.Documents.Open($File.fullname)
# Swap out DOCX with PDF in the Filename
$Name=($Doc.Fullname).replace("docx","pdf")
# Save this File as a PDF in Word 2010/2013
$Doc.saveas([ref] $Name, [ref] 17)
$Doc.close()
}
Run Code Online (Sandbox Code Playgroud)
我继续得到这个错误,无法弄清楚原因:
PS C:\docx2pdf> .\docx2pdf.ps1
Exception calling "SaveAs" with "16" argument(s): "Command failed"
At C:\docx2pdf\docx2pdf.ps1:13 char:13 …Run Code Online (Sandbox Code Playgroud) 使用AuthComponent :: allowedActions和AuthComponent :: allow有什么区别?当我谷歌时,我看到大多数示例和文档使用或讨论allow(),但只有少数使用allowedActions.但它们在使用上看起来相似.
在acos表中,model,lft和rght字段的cakePHP用法/含义是什么?同样,aros表中的lft和rght字段的用法/含义是什么?