I built a six-panel PDF display app, with 6 instances of the PDF Reader COM control on a Windows Form, and everything works great.
When the program loads, it reads a settings file to open the last set of PDF files so the user can continue where he left off.
I use SetCurrentPage so the user can specify what page to start each PDF on. But when the app exits, I need to SAVE the new current page so the user doesn't have to do this manually.
In order to restore the last page in each PDF, I have to find out the current page of the PDF Reader controls.
The control exposes a .setCurrentPage method, but nothing to GET the current page number. The exposed methods and properties don't seem to provide any access to the current page number.
Is there a way to do this?
Two DLL's are resident in the project: AxInterop.AcroPDFLib.dll and Interop.AcroPDFLib.dll, if that's relevant.
Thanks in advance,
There is no method in the control for this.
Ouch. That's a major disappointment. Do you have any suggestions for a slightly more useful way to instantiate a PDF reader inside a Win desktop C# app?
Get the AVPageView from the AVDoc, then use AVPageView.GetPage();
Is this a COM object? I'm not sure how to include it in the VS IDE for C#.
Also, will there be an instance of AVPageView in every instance of the Reader control?
BTW, this is for internal noncommercial use (and I have a full CC license).
I've taken a look at the AVPageView online docs, but I haven't yet seen how to incorporate it into my project.
Yes it is a COM object,or rather a COM interface. I may have been mistaken to have suggested it. This part of the AcroExch API is only available through Acrobat Professional. It's not in Reader 😞
Please see the reference for clarification:
I'll look into it further. Since I have CC, I have Acrobat Pro DC, and this project is for internal use only.
Thanks again for looking into this. I look forward to checking out those SDK docs.
I've built a working utility EXE developed in C# (VS), and the PDF control works only when I'm signed into my paid full-CC account. If I sign into Adobe with a non-paid subscriber account, it won't display any files. Is this correct, or am I missing something that would permit it to operate with only Adobe Reader installed and a non-paying Adobe account? I've set the default PDF app to the Reader, and not AcrobatCC, and signed into Adobe as the non-paid subscriber.
Thanks in advance,
For the use of the COM object you need an installation of Adobe Acrobat.
Well, that's inconvenient!
Thanks for the info.
Think of the Acrobat SDK as a marketing tool for Acrobat. There is a very tiny set of functions available in Reader, but think of them as designed to convince you of the wonders of Acrobat and persuade you to buy it. Nothing pleases Adobe better than selling copies across a company...