07-04-2017 05:06 PM
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
Solved! Go to Solution.
07-05-2017 07:27 AM
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
07-05-2017 07:43 AM
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
07-05-2017 09:15 AM
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
07-05-2017 09:28 AM
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 ?
07-06-2017 08:28 AM
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.
07-07-2017 08:32 AM
I cant find a document that details the active x interface, would National Instruments supply this - it is after all an NI function?
07-10-2017 01:45 AM
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
07-10-2017 02:51 AM
see also this post
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