LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open external document (.pdf or .doc) in default viewer?

Hello,
How do I open a document (.pdf or .doc) in the default viewer for that program type?
Thanks.
 
0 Kudos
Message 1 of 7
(3,900 Views)
Have a look at Labview\vi.lib\platform\browser.llb\Open a Document on Disk.vi

___________________
Try to take over the world!
Message 2 of 7
(3,896 Views)
Ah, thanks.  :O)
0 Kudos
Message 3 of 7
(3,894 Views)

hello,

 

this works fine unter LV2013 but with LV2014 it always opens the pdf file in the default browser (firefox) and not in the default pdf program (sumatra).

With LV2013 it works on the same PC.

 

I already tried to use the "browser.llb" from LV2013 in my LV2014 projekt but it also opens the default browser (firefox).

 

Is there an other way to open a pdf document in the default pdf program ?

 

 

 

Fred

 

 

0 Kudos
Message 4 of 7
(2,782 Views)

This works if you can put up with a command prompt (minimised)...

 

Use the System Exec.vi from Connectivity->Libraries & Execuables. Use 'cmd /c "<path to file>"' as the command line. (It should run with 'start' but for some reason LabVIEW throws a memory error if you try that!?!?!)

 

Unfortunately this kicks off a command prompt window which i'm not sure how to hide (but can minimise it with the run mimimised input), but at least it also kicks off Acrobat (or whatever) to launch your pdf file.

 

cmd.png

0 Kudos
Message 5 of 7
(2,768 Views)

Thanks Stuart, this works fine on my PC.

 

The LV program works on many different PCs with different Windows operating systems (XP, W7, W8).

 

Must I expect problems ?

 

Greatings

Fred

 

 

 

0 Kudos
Message 6 of 7
(2,740 Views)

Fred, glad its helped.

 

I wouldn't expect any problems, but I have only tried it on Win7. (Might not work on Mac or Linux, of course).

 

Cheers,

Stu.

0 Kudos
Message 7 of 7
(2,729 Views)