LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove all toolbars & menus from PDF viewer in a LabVIEW application

Solved!
Go to solution

Hello

I am displaying PDFs as per an example I found. It works great and I am very pleased with it.

One issue I'd like to resolve. When I open a PDF it shows the menu bar, side bars, etc. If I click onto the viewer and then use my keyboard and press CTL H - it just leaves the PDF on its own and gets rid of all the other stuff which is what I would like. Is there a way to programmatically do this?

I hope my attached screenshots compliment my question.

Many thanks

Lee

Download All
0 Kudos
Message 1 of 9
(4,486 Views)

Hey,

This is actually an issue with the PDF viewer itself.

 

I've found a thread on the Adobe website that discusses it:

 

https://forums.adobe.com/thread/1817184

 

Apparently if you move a few files out of the folder that contains the viewer, you can prevent it from opening the toolbars.

 

Unfortunately as the option is native to the viewer, can't really make that change when opening it in LabVIEW.

 

Nic

--------
Nico
Systems Engineer

Certified TestStand Architect Certified LabVIEW Architect

0 Kudos
Message 2 of 9
(4,378 Views)

You need to look at the ActiveX interface.

 

Have a look a this thread:

https://forums.ni.com/t5/LabVIEW/Determine-the-current-page-of-pdf/td-p/2769374

There is a quick PDF demo vi (works through ActiveX)

that I wrote a few years ago

On my PC (win 7 , LV 2015 SP1, acrobat reader DC)

the standalone reader displays as per your screenshot, but the demo does not show the side tool bar.

 

Hope this helps

 

James

 

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 3 of 9
(4,374 Views)

Hello

Thank you for responding to my question.

I opened your example and it has the same results as I am achieving.

Reading through the thread and other bits of 'looking up' it does seem to be tricky.

So, that said - when I click on the PDF viewer and then press CTL H - its perfect - get rid of it every time ... would you know how to go about that programmatically?

Thank you

Lee

0 Kudos
Message 4 of 9
(4,360 Views)

It would seem if I set it to READMODE (that is what CTL H does when pressed) - but cant seem to find it in the activex interface ?

0 Kudos
Message 5 of 9
(4,357 Views)

It may/may not be accessible through acvtiveX, searching through the documentation on the Adobe website will help you find the function name you want.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 6 of 9
(4,302 Views)

I cant find a document that details the active x interface, would National Instruments supply this - it is after all an NI function?

0 Kudos
Message 7 of 9
(4,290 Views)
Solution
Accepted by topic author LeeBowers1

Hi Lee,

I'll refer to my original response, and add that the ActiveX interface will be something documented by Adobe (if that's the pdf viewer you are using).

 

As I mentioned, the functionality of changing between the viewing methods is something native to the application, and as such there isn't a method within LabVIEW to force this behaviour.

 

Checking with Adobe for possible ActiveX calls would be a good step forward.

 

Nic

--------
Nico
Systems Engineer

Certified TestStand Architect Certified LabVIEW Architect

0 Kudos
Message 8 of 9
(4,282 Views)

see also this post

https://forums.ni.com/t5/LabVIEW/OLE-Automation-Methods-for-Acrobat-Reader-in-ActiveX-Control/td-p/9...

for details of a similar project by some people who really know their stuff but seemed to have trouble getting things to work in the end in a timely/costly manner.

 

You can search for info, or just look at the options available and play (Sometimes it is faster and Adobe docs searches are a nightmare).

 

- It may be you can't do all that you are trying to achieve if you use Adobe as the PDF viewer. Maybe another PDF reader will have different activeX plugins documented that will allow you to do this.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 9 of 9
(4,276 Views)