Jump to content

call pdf from LV


Recommended Posts

Hi,

The Task I'd like to perform seems quite easy, but I didn't manage to do resolve it at whish:

- providing just the path and filename of the pdf-file to system exec.vi, hoping that Win calls acrobat, doesn't work.

- providing the path and filename together with a "call" opens an unwanted command-line window, but works.

Does anyone has any idea how to open a pdf-file with the standard-application that is installed on the computer (in other word: let Win resolve the app that is linked to ".pdf")?

It should work on Win98 to WinXP, the pdf-viewer might (but must not) be acrobat reader, where the pdf-viewer is installed is unknown, if it is acrobat in which version it comes is unknown (so activeX is also not an option). Additional command-line windows are unwanted. LV version 6.1.

Didier

Link to comment
Hi Didier

In the LV forum was a discussion about

system exec.

Maybe this helps you.

Thomas

4623[/snapback]

Thanks, it helped.

I wasn't aware that I had to provide also a title to start-command, since the pdf-file I use has spaces and have to add " before/after the name. Thus <start> interpreted my input just as window-title, missed the command and returned with a "memory-full error".

Link to comment

There is a VI to do this in OpenG using Windows Internet Explorer.

www.OpenG.org

Be warned calling a PDF can be quirky. I've had it successfully work on my development machine everytime.

But then on installed applications - it will NOT work the first time?! (Windows)

I was using this for on-line manuals and help. But ended up taking it out in most distributed applications.

Regards

Jack Hamilton

Link to comment
  • 3 months later...
Hi,

The Task I'd like to perform seems quite easy, but I didn't manage to do resolve it at whish:

- providing just the path and filename of the pdf-file to system exec.vi, hoping that Win calls acrobat, doesn't work.

- providing the path and filename together with a "call" opens an unwanted command-line window, but works.

Does anyone has any idea how to open a pdf-file with the standard-application that is installed on the computer (in other word: let Win resolve the app that is linked to ".pdf")?

It should work on Win98 to WinXP, the pdf-viewer might (but must not) be acrobat reader, where the pdf-viewer is installed is unknown, if it is acrobat in which version it comes is unknown (so activeX is also not an option). Additional command-line windows are unwanted. LV version 6.1.

Didier

4622[/snapback]

There ist a VI already in the vi.lib.

-> "Open a Document on Disk.vi"

Can be found here: ...\LabVIEW 7.1\vi.lib\platform\browser.llb

Wolfram

Link to comment
I found no password protection in these VIs.

5681[/snapback]

Cool. :thumbup: I think I found that VI somewhere (maybe a previous version?) where it was passworded or something where I couldn't look at the block diagram... you're right on though... essentially the same thing as the previously posted VI with a little more subvi structure.

Link to comment
  • 1 year later...

I just append an improved version of the _browser WREG Read Key.vi here that is used by above mentioned Open Document on Disk.vi. I'm almost certain I had put that up somewhere already but may not remember right, so I do it now here.

This VI takes into account extra registration of applciations for a certain file type and treats them the same way explorer does. The old way opened the last registered application for that file type.

It is LabVIEW 7.1 format and the latest LabVIEW version might already contain this improvement, I didn't yet check.

Rolf Kalbermatter

Download File:post-349-1159618597.vi

Link to comment
Hi,

The Task I'd like to perform seems quite easy, but I didn't manage to do resolve it at whish:

- providing just the path and filename of the pdf-file to system exec.vi, hoping that Win calls acrobat, doesn't work.

- providing the path and filename together with a "call" opens an unwanted command-line window, but works.

Does anyone has any idea how to open a pdf-file with the standard-application that is installed on the computer (in other word: let Win resolve the app that is linked to ".pdf")?

It should work on Win98 to WinXP, the pdf-viewer might (but must not) be acrobat reader, where the pdf-viewer is installed is unknown, if it is acrobat in which version it comes is unknown (so activeX is also not an option). Additional command-line windows are unwanted. LV version 6.1.

Didier

It works with _System Exec.vi_ provided you set the command to

cmd \c "path\to\any\doc.type"

Set Run Minimized to True.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.