Example Code

Display PDF in Dialog box in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example uses Active X to open and view a PDF document within a dialog box on the LabVIEW front panel.

 

Description

Using this example, you can extend your user interface by embedding a PDF document in the front panel. The example VI has been configured to be a modal dialog window, which stays opened until the user presses a stop button.

 

Requirements

  • LabVIEW 2012 (or compatible)
  • Adobe Reader 9 (or compatible)

 

Steps to Implement or Execute Code

  1. Specify the path of the PDF document you wish to view.
  2. Run the VI.
  3. Press Stop button when finished viewing to stop the VI.

 

Additional Information or References

VI Block DiagramDisplay PDF File in Dialog Box LV 2012 NI Verified.png

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Artyom
Member
Member
on

Doesnt work, crashes on start up.

papai11
Member
Member
on

Me too. After Run, having an error: Control could not be loaded.

I either find any control or indicator named PDF Display. So, did my LabVIEW 2009 software lack anything or another reason? If you have any example about display HTML or PDF file on Front Panel, could you give me. Thank you so much!

pbuerki
Member
Member
on

Works fine as a standalone. However it does not work and generates error 3005 when run as a SubVI. Not sure why. Any ideas?

Nico_EMC
Member
Member
on

Have the same issue. It work again if you select "Insert ActiveX Object..." -> "Adobe PDF Reader" in the ActiveX on the front panel.

You need to run in "user interface" mode (VI Properties -> Execution -> Preferred Execution System).

chiritab
Member
Member
on

It is work just fine. Thanks.

Now I whant to search a text programaticaly when I oppen this pdf, somebody knows how I can find the method that search a text in a pdf?

Thank you.