The Adobe AxAcroPDF control has no function to return the current page number. I'm just making a personal utility, so I had the luxury of settling on a hack method I thought I would share... It's patched together with bits and pieces from across the net. It uses Windows native functions from User32.dll to enumerate the children of the control and find the textbox in the toolbar that corresponds with page number. The text from that is then read using a SendMessage call.
Determine Current page in AxAcroPDF object in C#
1.5k views Asked by TomEverin At
1
There are 1 answers
Related Questions in WINFORMS
- What is this namespace ITypeOfObjectsBoundToListBox ? Couldn't find it
- How to Require Confirmation on Form Close When there is Changed Data in a DataGridView
- self updating drawings C#
- Missingmanifestresourseexeption in auto genereted code of ImageList
- Child form implement in C# Winform
- Cannot find InvalidCastException in C# Application
- some labels appear gray in Visual Studio 2010
- c# richtextbox search with 2 forms
- Menu out of place when application is in full screen by Windows API
- How to access the Index of a changed Selection in a Datagridview
- showing a black transparent box over picturebox with an Image
- how to deselect all in RichTextBox before selecting newly found text?
- How to remove white space between border and BackColor?
- Validation DataGridView Windows Forms
- Invoke of a UserControl doesn't work
Related Questions in PDF
- Itext get special letters from pdf
- Carrierwave file upload with different file types
- Get text from a section of a pdf page with IcePdf
- itext pdf to image convert
- PDF to Text extractor in nodejs without OS dependencies
- PDF to ByteArray Conversion
- Opening PDF file in SWT Browser - XulRunner default viewer
- Generate TCPDF output to a shared drive folder
- Combine base and ggplot graphics in R figure window in different pages
- Updating a PDF Barcode Field in iOS and Android Device
- Prevent PDFsharp from saving an image file?
- Adding attachment links between lines in itext for pdf
- Crop Pdf from each edge using itextshap
- How to create a PDF with iText+XMLWorker from servlet using custom font?
- how to create a pdf editor for grails
Related Questions in AXACROPDF
- File being used by another process when using File.CopyTo method
- PDF display and URL redirection from WPF application
- how to automate xacro property extraction from .xacro file and use it in a python script in ROS
- C# Open a pdf from url in windows form
- AxAcroPDF won't open hyperlinks
- Is there a way to suppress adobe PDF reader API (AxAcroPDF) info messages?
- Hide "Export PDF, Create PDF, etc" Pane and Keep It Hidden
- AxAcroPdf Showing side bar
- Embbed a PDF into a WPF WebBrowser and then print it
- Clear and Reload PDF with axAcroPDF
- Loading file on axacropdf (pdf component) from mixed listbox
- WPF Control Freeze after WindowsFormsHost trigger to view PDF
- Unable to open network PDF file from embedded link inside another PDF
- Determine Current page in AxAcroPDF object in C#
- Show a Label while AxAcroPDF is still rendering or loading a file
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
This method enumerates the children components of the adobe pdf viewer and finds the text boxes in the toolbar. One of the textboxes is the page number, one is the current zoom value. The text box without a '%' in its content is taken as the page number text box. The content of the text box is retrieved using the SendMessage function.
You might need to call SetToolbarVisible(true) on the viewer component first, to make sure the toolbar (and hence text boxes) are visible.
This is a terrible and hacky solution, and could easily break as Adobe update the viewer. It would be great if Adobe would add a "getCurrentPage" method so all of this could be avoided.