Determine Current page in AxAcroPDF object

Dear all,
I am using Adobe's AxAcroPDF to view PDF files in my program (C# VS 2005 Windows Form). Does anyone know how to get the page number of the currently displayed page in the PDF viewer?
I can see methods to go forward and back 1 page at a time, go to the first or last page, or set the current page number, but I don't see any way to capture the current page number. I have the same problem to know the zoom currently used.
I have spent an entire day to reading SDK manuals and Googling but I don't find anything...
Thanks by advance for your help.
Nelson

I spent hours looking for a way, finally I just went to the User32.dll and got  the handle for the Page Number box.
I used FindWindowExA to find all the sub windows, isolated the one I wanted, then used SendMessageA to issue a GetText (&HD) which returned the value.
Total kluge and I have no idea how to work it on non-windows. Adobe Developers, please just put GetCurrentPage out, if your going to have SetCurrentPage.

Similar Messages

  • Determine current Page's Context Navigation Term using server object model

    I am trying to find a way to figure out the navigation term in the context of page processing that was requested through a friendly url.  I cannot seem to locate anything on MSDN.  The only similar functionality i see is using CSOM via _spFriendlyUrlPageContextInfo.
     

    Hi,
    Please refer to the following article, it has information how to get the friendly URL
    How to get friendly URL of the current page in Sharepoint programmatically
    Please don't forget to mark it answered, if your problem resolved or helpful.

  • Determine the current page of pdf

    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

    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:
    http://forums.ni.com/t5/LabVIEW/OLE-Automation-Methods-for-Acrobat-Reader-in-ActiveX-Control/td-p/95...
    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
    Attachments:
    Quick PDF demo.vi ‏17 KB

  • How do I determine whether the current page in Forms is the last page.

    I have a requirement of printing amount in words using SPELL_AMOUNT Funtion Module, in SAP Scripts.
    When I have only one Item Line, I am able to successfully, print the amount.
    The moment i have line items pouring to the next page, I see that the I am unable to retrieve the spelled amount from the Function Module.
    I think may be i need to find out if the current page is the last page, and if it is so, print the amount on the last page, .i.e., the page where the item lines have overflowed to. How do i find this out.
    Can anybody, suggest something.
    Regards,
    Owais...

    I wonder if you could do something like this.  Wrap your logic with this IF statement.
    /: IF &PAGE& = &SAPSCRIPT-FORMPAGES&
    /: ENDIF
    Regards,
    Rich Heilman

  • How to determine if the current page is a "Community Knowledge Directory"

    I am creating a new Navigation Scheme and I was wondering if anybody has figure out how to test to see if the current page the user is on is a "Community Knowledge Directory" page or not. What I am trying to do is display a different background color when the user lands on a page in a horizontal tab navigation. I've noticed that there is a control=SetSiteMap in URL when ever the user lands on the Community Knowledge Directory. Is that what I should be checking for?

    I am creating a new Navigation Scheme and I was wondering if anybody has figure out how to test to see if the current page the user is on is a "Community Knowledge Directory" page or not. What I am trying to do is display a different background color when the user lands on a page in a horizontal tab navigation. I've noticed that there is a control=SetSiteMap in URL when ever the user lands on the Community Knowledge Directory. Is that what I should be checking for?

  • IS-U print workbench - User exit - to get current page number

    Hi,
    I have a doubt in IS-U print workbench where in I need to get the current page number which is being processed inside the user exit of the application form.
    I have a user exit called Z_EXIT_150 and here I have a subroutine which is inside the LOOP DOC_ITEM …ENDLOOP.
    Inside the subroutine, I need to get the current script page number.
    There is an option of getting the current page as &PAGE& inside the Script but I need to know the page number inside the exit.
    Do you have any idea of getting the current page number?
    Thanks and Regards,
    Sakthi.

    Hi Sakthi,
    I have also had this problem while working in IS-U Print Workbench but was also unable to solve.  I tried looking into the output_text that is called when reaching an object that references SAPSCRIPT-FORMPAGES but I too could not find a way to save PAGE to a variable for later use.
    The only idea I can think of, although I have not tried, would be to place some sort of counter variable in the BUILD_DOCUMENTS and increment the counter each time there is a successful printout of a header logo or some other object that you expect to see printed on each new page - that way maybe you can determine later in the exit processing what page # you are currently in. 
    I hope this has helped some.  I would be really interested to hear if someone else has a solution of how to access items in the SAPSCRIPT structure from outside of the SAPscript code.
    Regards,
    Geoff

  • Dynamically set Tab current pages

    Here’s a quick summary of the situation I’ve got.
    Let’s say I have an application with 4 report pages. Three display some data about rows in my database. All 3 contain the column ‘Control #’ which is linked to the 4th report which displays more detailed information about that Control # object.
    When I click on the Control # link and go to the 4th report, I would like the Tabs current for the 4th report to match the Tabs current of the page I came from. In other words, if I clicked on the Control # link on page 1, I would like the 4th pages current tabs to match page 1’s current tabs. The same goes for pages 2 and 3.
    I’ve tried &(some global variable). and :(some global variable) and v(‘some global variable’) in the Tabs current pages fields but that doesn’t work.
    Is it possible to do what I’m trying to do?

    Reports 1, 2 & 3 all exist in individual two tab pages. Pages 1 & 2 would have the same parent tab and their own sub tab. Page 3 would have its own parent tab. When in those pages the appropriate tabs are 'current'. When I click on Control # on any page and go to page 4, I would like the source pages tabs to stay 'current' when displaying page 4.
    By the way, my actual application has in the neighborhood of a dozen pages which are like reports 1,2,& 3 as I described above. Rather than build a dozen identical (with the exception of current tabs) page 4's, I would rather build one page 4 and dynamically set page 4's current tab to the source page's current tab.
    It's a visual reminder to the user as to which page they were on when they clicked the Control # field.
    I also have 8 - 10 SVG charts which I have linked to reports. About 6 of them display the same report using different parameters. Again, I would like THAT report to have the same current tab as the source chart (chart clicked on to invoke the report).

  • How to determine the page count of the front document (pdf-Preview) with applescript?

    Hello, I'm a beinnger apple scripter, and I have 2 questions. First, im trying to find the code to generate a page count for the front document of preview. I tried something like this:
    choose file with prompt "Count the number of pages in this PDF file:" without invisibles
    do shell script "/usr/bin/mdls -name kMDItemNumberOfPages " & quoted form of POSIX path of result & " | /usr/bin/grep -o '[0-9]\\+$'"
    But I dont want to have to choose a file with the prompt, and Im not sure how to get the path or POSIX path of an open pdf that is the front document in prievew to then use that directory to select the file to run the shell script on. This is one step in a much larger sequence of automator/apple script commands for large print jobs.
    The large scale view is:
    1. seleting a group .musx Finale 2014 files and creating pdfs of all the documents
         -Achieved with Automator stuff: [Get selected finder items] [open finder items with Finale 2014] [run applescript to convert to pdf all the open files] (which I have working but without a proper repeat condition)
    2. sorting those those exports into even/odd groups
    3. making the even pages 2 up with a create booklet plugin
    3. combinging even/odd group pdfs in their respective folders
    4. sending the 2 up evens to 1 printer, and the singes to another printer.
    but at this stage in the code/automator this is what i'll need to be doing:
    1. Several pdf documents will be open and I need to determine the page count of the front document.
    2. With that result I need to determine if the pagecount is even or odd.
    3. If its even, I need to save as pdf in a file folder /desktop/PDF Export/Doubles
         - if its odd, I need to save as pdf pages from 1 to (pageCount -1) to /desktop/PDF Export/Doubles, and pages (pageCount) to (pageCount) to desktop/PDF Export/Singles. (example: A 5 page pdf will send pages 1-4 to folder "Doubles", and pages from 5 to 5 to Singles, A 1 page pdf will only send a copy to the folder "Singles." A 2 page pdf will send both pages to "doubles"
    4. once the even/odd pages have had pdfs made in the either or both of the folders, Im going to close the document and repeat for all other open pdfs.
    Which also brings me to my 2nd repeat condition question: how can I repeat (print, save as pdf, close) commands for open files and end the script once all files are closed? This can help me both at this stage, as well the coding stage before in creating the pdfs from open Finale/sibelius .sib/.musx files
    would it be something like this?:
    If front document exists
    try
    tell application "preview"
    <bla bla>
    end try
    end tell
    At stage 1 of the large scale i've gotten the files to export pdfs and close multiple files, but if i say "repeat 4 times" and i have 3 files it can do those commands but it gets stuck trying to repeat the code one more time. I need the repeat amount x to be the # of items in selection from the the original finder window.
    Thanks for the help!

    The following AppleScript will get the POSIX path and filename of the current PDF file. It will just return the integer value for page count. Note: The path retrieved is the actual path to the PDF file, unless it is on the Desktop. In the latter case, the path will be ~/Library/Containers/com.apple.Preview/Data/Desktop/filename.pdf.
    The script assumes that the following folders exist, otherwise you will need a try block to test for their presence.
    The AppleScript dictionary for Preview does not provide a page dictionary entry, that would make a repeat loop and page range possible for saving individual page ranges.
    set pdfDoubles to POSIX path of ((path to desktop) & "PDF Export" & Doubles)
    set pdfSingles to POSIX path of ((path to desktop) & "PDF Export" & Singles)
    tell application "Preview"
      -- gets quoted POSIX path and filename
              set pdfFile to (get path of front document)
              set pdfName to (get name of front document)
      log pdfName
              set cmdArg to "/usr/bin/mdls -name kMDItemNumberOfPages " & pdfFile ¬
                        & " | egrep -o \"(\\d+)\""
              set pageCnt to do shell script cmdArg
      display dialog pageCnt
              if pageCnt mod 2 is 0 then
      -- even
      -- save pdfName in pdfDoubles
              else
      -- save pdfName in pdfDoubles
      -- save individual pages in pdfSingles
              end if
    end tell

  • How i can get a array in the current page?

    Can i send a array parameters from previous page to current page?
    the coding like below:
    // the coding in the previous page
    String[] strSend = {"a", "b", "c"};
    HashMap map = new HashMap(2);
    map.put("array", strSend);
    pageContext.setForwardURL(
    "OA.jsp?OAFunc=XXFMSRHISQF",
    null,
    KEEP_MENU_CONTEXT,
    null,
    map,
    true,
    ADD_BREAD_CRUMB_NO,
    IGNORE_MESSAGES );
    //the coding in the processRequest of the current pageCO.
    String strParam = pageContext.getParameter("array");
    the problem is that the type of "strParam" is a String.
    it's not a array of String. So it is not the parameter what i need.
    can u tell me how to get the array parameter from previous page. thanks.

    This cannot be achieved directly while using the setForwardURL method, all values that are there in the Hashmap will be appended when the redirection is done, so you cannot get the values that are there in the array object directly.
    Workaround that I can think of, put all the array values in a String object, appended by a delimiter, in the second page, after you do a getParameter(String), recover the values using a StringTokenizer and the delimiter that you used while appending the string values and store the values in a Array.
    Thanks
    Tapash

  • Get current page or page of selected item

    Hello,
    I' d like get the current page in Indesign or (if this is not possible) the page of a selected object.
    How could I implement this?
    var page = app.selection[0].page;
    does not work.
    Thanks and kind regards,
    mannyk

    Another way getting that done is based upon what is your current
    selection.
                    var myPg=getPage(app.selection[0]);
                    alert (myPg.name);
    function getPage(theObj)
    if (theObj.constructor.name == "Page") return theObj;
    if (theObj.constructor.name == "Character" || theObj.constructor.name ==
    "Paragraph")
    return getPage(theObj.parentTextFrames[0]);
    if (theObj.constructor.name == "Application")
    // Frame is on an unexpected place...
    alert ("Can't able to find the page");
    exit(0);
    return getPage(theObj.parent);

  • Obtaining the template of the current page in extJS

    Hi,
    How can I obtain the template of the current page in the design dialog of a component?

    Found a solution to it. All the properties of the page gets stored in an json object which can be accessed by appending .1.json to the page url. If http://localhost:4502/content/en.html is your page, then http://localhost:4502/content/en.1.json gives your page properties. Hence, we can extract the required property(cq:template) from the object using getJSON() method.

  • Programmatically print current page in a drill-down view

    VB.NET 2008, CR 2008
    Calling the PrintToPrinter method of the Report Document allows me to print a specified page to the printer. 
    However, there doesn't seem to be a similar method that allows specifying a page for the viewer control. 
    Is there any way to programmatically print the current page displayed in the Viewer, even when the view is a drill-down view?
    Thanks
    ido

    Hi David,
    Thanks for the quick reply.
    Perhaps I didn't explain myself clearly enough.  I can't use the reportDocument.PrintToPrinter() method because that method completely ignores the fact that the viewer control is currently showing a drill-down view. 
    For example, if the viewer is showing Page 1 of a drill-down or on-demand subreport, calling reportDocument.PrintToPrinter() would print a page from the main report, not from the drill-down view.
    So, the question is: can I print a specified page from the Viewer control (not from the ReportDocument object).
    Thanks,
    ido

  • Javascript pop up windows -- forces the current page to change?

    I have a really odd bug. I am testing a javascript popup window for a report. I edit the column of the report and tell it to link to a URL. For testing purposes I just put in javascript:window.open(); That takes fine. However, when I click the link in the report, it refreshes the current page, the url stays the same but the only thing I see on the page is [object]. White screen, black text. Anyone have any idea as to whats causing this? Thanks a bunch.

    Create the &lt;A&gt; like this
    &lt;A href="javascript:void(0)" onclick="javascript:fnPopup()">link&lt;/a&gt;
    or
    &lt;A href="javascript:fnPopup()"&gt;Link&lt;/a&gt;
    To achieve this I will type the following in URL
    javascript:void(0)" onclick="javascript:fnPopup()
    Note: there is no double quotes at the beggining and end.

  • Hiding current page only seems to make invisible or shows view of master page?

    I have a button that is as follows:-
    runs a few validation checks blah blah then ......
    else
    this.resolveNode("Page3").presence = "visible";
    xfa.host.currentPage = 3;
    this.resolveNode("Page1").presence = "hidden";
    So on click it goes to page 3 - that's fine, but it only seems to set the current page to invisible, as it leaves behind a blank page/master page to view?
    I have tried to include
    xfa.layout.relayout();
    but this has no effect.
    If i place a similiar button hiding Page1 outside Page1 then there is no problem, it hides and is taken right out of the form as i am hoping with the button sitting inside page1.

    Rick, thanks for thinking of that setting; however, we've already left "Fade Out on the Last Slide" de-selected, so that's not the issue.
    It seems that on the last slide, the "rest of project" objects endure only for the number of seconds of that slide; for example, if a slide's duration is set to 3 seconds, the "rest of project" objects fade away after 3 seconds; however, nothing else on the page fades away; that is, the images and captions set to "rest of slide" continue to display.
    Jan

  • Current Page Number

    Hi,
    I'm a newbie at any kind of Acrobat development, but can't seem to find a way to get the current page number on the client side of a pdf loaded into Reader. Is there a fairly painless way to do this? Additionally, it'd be cool to be able to change pages using client-side script as well (I'm currently re-loading it with the #page= attribute)...can I do that easily?
    Here's a short description of the app so that my questions make a little more sense:
    - Dropdowns on the left to drill down to a specific set of options. Iframe on the right that loads a corresponding pdf and loads the proper page for the dropdown options the user has selected as they drill down.
    - Need to be able to reverse the process somehwat so that if the user goes to a page in the pdf on the right I can update some of the info on the left.
    Any tips on how to accomplish this are greatly appreciated! :)
    Thanks!

    Thanks, Malky! I have been looking more into that aspect of the sdk now and it looks promising. However, I've downloaded the samples and can't seem to get any of them to work. I even tried the html sample figuring it'd be the easiest to get running, but the control specified by the object tag won't load (and doesn't error or anything like that). Can you point me in the right direction for getting started with the IAC stuff? Do I need to have Acrobat in order to do this or something? Thanks for your help!

Maybe you are looking for

  • USING A PCI CARD TO RUN A 320GIG ATA/IDE HD IN A QUICKSILVER G4

    I didn't realise that my model did not support HD's over 120gb. After much reading I found out that I would need a PCI ata 133 card. On checking on ebay it was confusing as to which one. What do I specifically need? There is a range in prices also fo

  • HP w17e Monitor-Camera?

    I have a HP w17e monitor attached to a Mac-Mini (mid 2007version). Mac Mini is running OSX 10.6.8. Was a little frustrated Sunday during a web chat (i-Chat) with a relative. I could see him,but he couldn't see me. Does this monitor have a camera? If

  • No control bar when viewing on website

    Does anyone know how i can get the control bar to show on a Quicktime clip i have embedded in my website? www.petrolheads-productions.com/companyreel.html

  • "This file cannot be exported to the selected location" Error always appear

    Dear All, when am trying to Export an excel sheet as a contract file, i click save as and i get the error ( This file cannot be exported to the selected location ) on some clients computers not all of them, any advice please? Regards

  • Lightroom export color profiles not working as expected...

    I'm trying to produce an image for a commercial printing service using the colour profile they provide.  I get the image looking the way I want in Lightroom and export it to a jpg with the printing service's printer profile.  As far as I understand i