Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adobe Reader API

121 views
Skip to first unread message

Robert_...@adobeforums.com

unread,
Oct 6, 2008, 4:01:01 PM10/6/08
to
Regarding Adobe Reader API, I know it's very limited, but all I need to do is open a file and go to a particular page. I've tried:

With AcroPDF1
.LoadFile "C:\test.pdf"
.setCurrentPage 3
End With

which gives me "Runtime Error 424, Object Required," and I've tried:

Dim AcroPDDoc As Object
Set AcroPDDoc = CreateObject("AcroExch.PDDoc")
Set pdDoc = CreateObject("AcroExch.PDDoc")

which gives me "Runtime error 429, Activex component can't create object."

I've made sure all References to anything Adobe or Acrobat are checked off (I'm programming in MS Access using VB).

What am I missing?

Thanks.

(PS I do own Acrobat Standard that I use on my office machine and I can't get the code to work there either. But I need to be able to use Reader for the project I'm working on.)

Bernd Alheit

unread,
Oct 6, 2008, 4:09:00 PM10/6/08
to
You can find the information in the Acrobat Interapplication Communication Reference:
<http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACReference.pdf>

Robert_...@adobeforums.com

unread,
Oct 6, 2008, 11:51:20 PM10/6/08
to
Bernd--

I've poured over it, but bottom line is I keep getting "Runtime error 429, ActiveX component can't create object" when I try to create any object.

I'm using Adobe Reader.

I believe most of the IAC Reference you suggest applies only to acrobat, not to Adobe Reader.

The only OLE Auto method that I think should work with Adobe Reader is crobat AxAcroPDFLib.AxAcroPDF but I CANNOT find the syntax as to how to create an object with it.

How do I create an object to open Adobe Reader (not Acrobat)? What's the syntax?

Aandi_...@adobeforums.com

unread,
Oct 7, 2008, 3:14:36 AM10/7/08
to
>How do I create an object to open Adobe Reader (not Acrobat)?

Example 2.3 in "Developing Applications using Interapplication
Communication" in the Acrobat 8.1 SDK seems to cover this.

Aandi Inston

Robert_...@adobeforums.com

unread,
Oct 7, 2008, 10:51:34 AM10/7/08
to
Again, thanks for the reply.

I have read through the "Developing Applications..." in the SDK and several other publications, but it's still not working.

I even tried upgrading from Adobe Reader 8.1 to 9.

(The version of Microsoft Visual Basic I'm using is 6.0 with MS Access 2000.)

When I simply cut and paste from Example 2.3, the following commands are not recognized:
Friend WithEvents AxAcroPDF1 As AxAcroPDFLib.AxAcroPDF
Me.AxAcroPDF1.Location = New System.Drawing.Point(24, 40)
Me.AxAcroPDF1.Size = New System.Drawing.Size(584, 600)

MORE OVER, when I simply cut and paste all of Example 2.1, which should be fine, I AGAIN get ...Runtime Error 429, ActiveX component can't create object" at the very first line:
Set app = CreateObject("AcroExch.App")

That should tell us there's something wrong that has less to do with syntax and more to do with something basic.

What could that be?

Bernd Alheit

unread,
Oct 7, 2008, 11:16:15 AM10/7/08
to
You are using a old version of Visual Basic.

Example 2.1 requires an installation of Adobe Acrobat.

Robert_...@adobeforums.com

unread,
Oct 7, 2008, 2:03:34 PM10/7/08
to
You mean I'm not using .NET yet?

That's true. Do I have to use .NET to programatically open a PDF and skip to different pages? No way in VB6? That would seem strange...

Bernd Alheit

unread,
Oct 7, 2008, 3:11:38 PM10/7/08
to

You mean I'm not using .NET yet?


You don't need .NET.

Robert_...@adobeforums.com

unread,
Oct 7, 2008, 5:01:08 PM10/7/08
to
Bernd:
"You are using a old version of Visual Basic." (6.0)

"You don't need .NET."

Brother, what do I need?

And is it clear that I'm trying to open up an instance of Adobe Reader outside of my database (not inside a form within the database)?

Aandi_...@adobeforums.com

unread,
Oct 7, 2008, 5:48:54 PM10/7/08
to
>And is it clear that I'm trying to open up an instance of Adobe Reader outside of my database (not inside a form within the database)?

Not at all clear, and if you want to do that, why are you using
AxAcroPDF - this is a browser control, designed to display within a
form. It does not open a separate Reader window.


Aandi Inston

Robert_...@adobeforums.com

unread,
Oct 7, 2008, 6:47:10 PM10/7/08
to
Thank you! At least I can rule AxAcroPDF out!

How would I open an instance of Adobe Reader outside my database? (and then go to different pages)?

Aandi_...@adobeforums.com

unread,
Oct 8, 2008, 3:43:44 AM10/8/08
to
>How would I open an instance of Adobe Reader outside my database?

You can start Reader via the Windows API (not OLE).

> (and then go to different pages)?

There is a DDE interface, not sure if it offers this facility. You
might have reached beyond the limits of what is available in the free
Reader.


Aandi Inston

Laurent_...@adobeforums.com

unread,
Nov 26, 2008, 6:03:15 PM11/26/08
to
Hi Robert,

Maybee this message will be obsolete, but ...
I'm actually trying to manipulate PDF files into my program using the API commands.
I embedeed into my project the ActiveX (acropdf.dll). I open my document and set it to a specific page using the various command of the API.
Actually, I tried to find the documentation for all the functions of the API but didn't succeed into my quest. If you have any informations, It will be very appreciated.

If you are still looking for info, come back to me.

Laurent Richelle

Robert_...@adobeforums.com

unread,
Nov 26, 2008, 6:23:47 PM11/26/08
to
I wanted to open it up in a different program, not my application, so I gave up with Reader and API, and chose to use IE instead. Much more documentation and easier to work with.

Anders_Hägglund@adobeforums.com

unread,
Dec 3, 2008, 8:36:56 AM12/3/08
to
Now this was an interesting thread...

I have a similar problem, but I am not so familiar with VB or javascript or the Windows API, so I would appreciate explicit examples.

I would like to make a .bat script (yes, DOS, under Win XP) to open a .pdf document using Acrobat Reader (v. 8.1.0 in my case). If the document is already open, I would like to close it and reopen it.

Today, I do this with
"C:\Program Files\Adobe\Reader 8.1\Reader\AcroRd32.exe" test.pdf
which works. However, it also locks the file for editing. I therefore need a way (from the command line) to either close test.pdf or open it read-only.

I realize that this (at least closing the document) should be accessible via Adobe Reader API or Acrobat IAC, possibly through the javascript command app.openDoc() (I have looked into the documents mentioned above), but I have no clue about how to do this from the command line. Anyone care to help me out with an example?

Anders Hägglund

0 new messages