【发布时间】:2015-08-04 16:51:36
【问题描述】:
我的机器上安装了 Acrobat XI Pro。
我正在尝试编写 PowerShell 代码,该代码将使用 https://groups.google.com/forum/#!topic/comp.text.pdf/DNtcbUgjas4 和 Convert pdf to Word document 等技术从 PDF 文档中提取页面
当我在GetPDDoc() 的输出上调用GetJSObject() 时,我得到一个System._ComObject,它没有公开我发现的各种示例代码中使用的任何方法:
PS> $JavaScriptObject
System.__ComObject
PS> $JavaScriptObject.GetType()
Value does not fall within the expected range.
At line:1 char:1
+ $JavaScriptObject.GetType()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException
PS> $JavaScriptObject.numPages -eq $null
True
有什么线索吗?
注意:使用来自https://groups.google.com/forum/#!topic/comp.text.pdf/DNtcbUgjas4 的代码在 VBS 中也可以使用完全相同的逻辑
【问题讨论】:
标签: powershell pdf automation acrobat