LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OLE Automation Methods for Acrobat Reader in ActiveX Control

When you drop an instance of an Adobe PDF Viewer into an ActiveX Container, you get a FP terminal that defaults to the "AcroPDFLib.IAcroAXDocShim" class. This appears to be "AxAcroPDFLib.AxAcroPDF" (refer to page 239) according to the Acrobat Interapplication Communication Reference. I would like to have access to all the different classes of Automation Methods (start at page 5 in that document) such as the AcroExch.App and AcroExch.AVPageView.

 

Now, if you take the terminal, change it into a constant, you can right click on it and go to "Select ActiveX Class" at which point all available classes are available. (see below, how I have changed from the IAcroAXDocShim class to the CAcroApp class)

 

In short: how can I access all of these methods on the original parent container that contains the document?

 

AdobeReaderMethods.png

0 Kudos
Message 1 of 12
(23,284 Views)

Here's a related question, and maybe has a more simple answer: I would like to programmatically determine what page in the document is currently being viewed in the container. How can I do so?

 

Best regards,

Jack

0 Kudos
Message 2 of 12
(23,270 Views)
I don't understand what you're trying to do. Why did you change the class? If you have the ActiveX container, why are you asking how to access the methods on the original parent container? You have the container.
0 Kudos
Message 3 of 12
(23,261 Views)
Please check out all the available methods in this reference document in the table of contents starting on Page 5. The only methods available in LabVIEW are those under the AxAcroPDFLib.AxAcroPDF. I want to be able to access the other methods in other classes.
Message 4 of 12
(23,256 Views)

The AxAcroPDFLib.AxAcroPDF is the ActiveX control that can be embedded into any ActiveX container, whether it's LabVIEW or something else. The other classes refer to accessing the Acrobat Reader app itself, in the same way as Excel is manipulated using ActiveX. In that respect, it's two different worlds. 

 

So, are you trying to automate Acrobat, or use the browser control (AxAcroPDFLib.AxAcroPDF)?

 

 

EDIT: I just remembered and did a quick check to confirm: The other classes only apply to the retail version of Acrobat. They apparently do not apply to the Reader. 

Message Edited by smercurio_fc on 07-29-2009 02:36 PM
0 Kudos
Message 5 of 12
(23,248 Views)

Basically, it boils down to making a PDF viewer that is compatible with a touchscreen monitor. The native PDF controls are small, and do not conform to the UI standard implemented through the rest of the application.

 

New buttons would be created that allow for zooming in and out, fitting to page height/width, and a scrollbar.

 

To achieve such a goal, I need more methods than are available in the base ActiveX Reader control.

 

Below is a quick sketch that shows my goal: enlarged controls for an embedded PDF viewer. The items circled in RED would go away, replaced by LabVIEW controls that control the PDF viewer.

 

TouchScreenPDF.png

 

 

EDIT: Oops, Fit Width button and Zoom In are duplicated. One should be Fit Page and the other Zoom Out.

Message Edited by mechelecengr on 07-29-2009 03:42 PM
0 Kudos
Message 6 of 12
(23,242 Views)
Well, all that I can say is that it is what it is. The Reader ActiveX control is limited. If it doesn't have the capabilities you need, then you need to see if there's another ActiveX control available that has.
0 Kudos
Message 7 of 12
(23,237 Views)
Yeah, that's what I was afraid of. I have already searched the interweb with keywords like "Free PDF ActiveX Control", but have not yet come up with a solution without a distribution license fee. Having a fee is not necessarily a deal-breaker, so if anyone who has used a "highly configurable" PDF viewer with success, please ping me here.
0 Kudos
Message 8 of 12
(23,234 Views)

I am currently running Adobe Acrobat V7 here and would like to be able to use ActiveX or another method to create PDF files from within LabVIEW.

 

Is it possible?

 

I am a bit overwhelmed with the Active X classes I am being presented with!

 

 

0 Kudos
Message 9 of 12
(23,129 Views)

mechelecengr wrote:
 

Now, if you take the terminal, change it into a constant, you can right click on it and go to "Select ActiveX Class" at which point all available classes are available. (see below, how I have changed from the IAcroAXDocShim class to the CAcroApp class)

 

In short: how can I access all of these methods on the original parent container that contains the document?

 


I can't help you with Acrobat here but ActiveX consists really of two object types. One are ActiveX controls that have an UI and can be embedded in a container and the other are Active X Automation servers that can be instantiated as object but do not have any direct UI itself.

 

The ActiveX container in LabVIEW will only show you ActiveX objects of the first type. To employ the other type you have to use the Automation Open function instead. Automation Open will instantiate (create) the Automation server object based on information in the registry and then gives you a refnum you can work with.

 

When selecting an Active X control into a container the instantiation of the control is done automatically inside the control and that is why you do not have the need to execute an Automation Open for such objects.

 

If you need to get the full Acrobat to get all the functionality I wouldn't know, bu I have my doubts that you can do it with the Reader component alone. The ActiveX controlallows very little control of the visibility of its various components and the ActiveX Automation classes do not have an UI component you can embed in a container.

 

Rolf Kalbermatter 

Message Edited by rolfk on 08-11-2009 08:24 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 12
(23,125 Views)