Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Powershell & Acrobat Professional
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Powershell & Acrobat Professional

 Post Reply Post Reply
ErVoRe View Drop Down
New Member
New Member

Joined: 20 Jan 2017
Points: 1
Post Options Post Options   Quote ErVoRe Quote  Post ReplyReply Direct Link To This Post Topic: Powershell & Acrobat Professional
    Posted: 20 Jan 2017 at 8:23am
Acrobat Professional can be automated using the JSObject. I played a little bit around and some things also are working.
$TestPDF = "C:\Powershell\PDF\FirstTest.pdf"
$PDF = New-Object -ComObject AcroExch.App
$AVDoc = New-Object -ComObject AcroExch.AVDoc
$PDFDoc = New-Object -ComObject AcroExch.PDDoc
if ( $PDFDoc.Open($TestPDF) ) {
  $jso = $PDFDoc.GetJSObject
  $page = $PDFDoc.AcquirePage(0)
  $jso.console.println("Hello, Acrobat!")
  $PDF.Show # Does not work .... ---

I have however installed Acrobat Reader further to Acrobat Professional. Maybe that Powershell uses the dll from Reader instead of Professional ?
Loading explicitely the dll does not work, when I try:

Add-Type -Path 'C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Acrobat.dll'

I get the error message:
Add-Type : Could not load file or assembly 'file:///C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Acrobat.dll' or one of its dependencies.
 The module was expected to contain an assembly manifest.

Any Idea ?

Thank you very much
Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member

Joined: 15 Jul 2011
Location: USA
Points: 4116
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jan 2017 at 7:40pm
Have you looked at the Acrobat SDK material. It is freely downloadable through the Adobe Acrobat Developer Center. The documentation has examples using various programming languages but not command line or Power Script code.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.078 seconds.