03-07-2014 04:12 PM
In my VI I load a pdf into an activeX container.
I would like to be able to progammatically determine which page is currently being viewed. I have looked throught the various property classes and method classes for the adobe pdf reader and can't find anything that will tell me what page is active.
Does anyone have any ideas?
Thanks,
Torry
03-08-2014 11:56 AM
Well,
thinking around the subject, you could use the functions : gotoFirstPage so that you know where you start,
then remove scroll bars from the operator and just give them a Page up and Page down function (gotoNextPage gotoPreviousPage) on button press events??, not really what you wanted but if you know where you are starting from and you know how many times they have gone forward pages, then you know which page you are on!!
James
03-10-2014 09:05 AM
Thanks James,
That will work for my program if I can figure out how to disable the adobe page up/page down controls.
If the user uses the adobe controls instead of mine, I will lose track of which page they are on.
Does anyone know a way to disable the adobe controls, preferably programmatically (the program will be deployed on serveral computers)?
Thanks,
Torry
03-11-2014 10:07 AM
I realized I can use the setCurrentPage method to change the page to the one my control has as the page, which will in effect disable the adobe controls, but it is not a very clean solution.
Can anyone think of a cleaner solution? Or does anyone know how to determine the current page, so it wouldn't be necessary to override the adode controls?
03-14-2014 06:05 AM
Hi torry7
1) have you tried googling for information about the Adobe ActiveX interface? (LabVIEW will not be the only program that uses this but the interface item names should be the same so you should be able to see if someone has solved this in another programming language)
2) there is a property called "setShowToolbar" - have you tried disabling the toolbar with this and seeing if this allows you to do the method I suggested at first?
James
03-14-2014 06:28 AM
Hi Torry
looks like some of the best have been looking at this a few years ago and found it too much of and issue to deal with - suggestion would be to stop wasting time on it:
Or, if you want - here is where I have got in 5 mins following my nose (see attachment)
Just need to get rid of navigation pane and you are sorted!!
James
03-30-2014 10:10 PM
If you want to get the current number of PDF page, I think you may need a class to process the PDF pages. Here is a link on the same issue. But it is not designed for Ni. Maybe it can give you some insights.
http://tex.stackexchange.com/questions/11962/how-to-determine-current-page-number