Example Code

Print in PDF by IE / set default printer in registry

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 is a simple VI that prints HTML file through IE(ActiveX) on installed PDF printer - specific name of file is inserted to save dialog.

 
Description
This VI is used to print HTML file through IE(ActiveX)- specific name is inserted to PDF save dialog. Hypertext Markup Language (HTML) is the standard markup language for creating web pages and web applications. With Cascading Style Sheets (CSS) and JavaScript it forms a triad of cornerstone technologies for the World Wide Web. Web browsers receive HTML documents from a webserver or from local storage and render them into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.

The Default printer path: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows

 

Requirements

Software:

  1. LabVIEW 2014 (or compatible)


Steps to Implement or Execute Code

  1. Supplying the name of the PDF printed file
  2. Run the application

 

Additional Information or References

VI Snippet

  Print in PDF by IE  set default printer in registry 2014 NIVerified.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
Pankajusic
Member
Member
on

Can you please upload LV2013 version of the code.

I am not able to access it.

Thanks in advance.

Pankaj