0

I have a application where I have a pdf to show. I used AxAcroPDFLib. I can successfully show any pdf in that control. Now I want to get the current page of that pdf. There is no method like getCurrentPage in AxAcroPDFLib.

How to get that current page number. I searched it but did not find any solution for this.

Marnix van Valen
  • 13,265
  • 4
  • 47
  • 74
Saikat
  • 410
  • 2
  • 9
  • 25

1 Answers1

0

You're not showing the code you currently are using, but your problem likely stems from the fact that you don't realize there is an additional layer present here. The document methods in the Adobe PDF library truly only deal with the PDF file itself and a PDF file doesn't have a current page number.

To display PDF documents, Acrobat uses an AVPageView. The AVPageView is your link for anything that concerns the display of your PDF files.

AVPageView has a method to get the currently visible page:

PDPageNumber AVPageViewGetPageNum(AVPageView pageView)

So from the document, get its page view and work with that to get the page number, zoom factor, display mode and so on.

David van Driessche
  • 6,602
  • 2
  • 28
  • 41
  • Please share some couple of codes which will help me to understand. – Saikat Sep 08 '15 at 10:07
  • Is that in the AxAcroPDFLib? I was thinking that was part of the SDK. This would be great if it's included somehow with the COM controller. – Timmy Sep 29 '15 at 17:10