Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing a CVI application with Adobe Reader

It may happen sometimes that a user wants to read a PDF document while running a CVI application.

While this task can be easily obtained by calling OpenDocumentInDefaultViewer () function from the Programmer's Toolbox, this command launches a separate Adobe Reader application, which can be sometimes undesirable.

An alternative to this is to open an interface with Adobe Reader embedding an ActiveX control on a CVI panel. Adobe Reader comes with an ActiveX component on top of which an instrument can be created within CVI: simply place the appropriate ActiveX object on a panel, right-click on it and select Generate ActiveX Control Driver option from the context menu: the result is an instrument driver (.fp) that can be added to CVI projects.

The attached documentation includes the instrument driver generated this way based on Adobe Reader 8 (AcroPDF), together with a sample program that demonstrates how to use it (ARInterface). The code has been developed on CVI 2009 SP1.

The application has been successfully run on machines with Adobe Reader 8 installed as well as on a machine with ReaderX.

Based on my observations, ActiveX interface is generally faster that opening a separate Reader application: the sample permits both options so that a direct comparison can be made (NOTE: on machines with Adobe Reader 8 installed it appears as if the same document cannot be opened within the CVI panel if already opened in the Reader. This does not happen on the machine with ReaderX. On all machines, opening the document in the embedded controls does not prevent to reopen it in a separate Reader window).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Download All
Contributors