To get a pdf page number.
To get a pdf page number.
Rate To get a pdf page number.
(1(1 Vote))
using Acrobat;
using AFORMAUTLib;
public static DisplayPDFPageNumber(string FilePath)
{
AcroPDDocClass objPages = new AcroPDDocClass();
objPages.Open(FilePath);
int TotalPDFPages = objPages.GetNumPages();
objPages.Close();
AcroAVDocClass avDoc = new AcroAVDocClass();
avDoc.Open(FilePath, "Title");
IAFormApp formApp = new AFormAppClass();
IFields myFields = (IFields)formApp.Fields;
for (int i = 0; i < TotalPDFPages; i++)
{
string PageNumber = myFields.ExecuteThisJavascript("event.value=this.getPageLabel(" + i + ");");
MessageBox.Show("Page " + i + " : " + PageNumber + "");
}
}
To get a pdf page number. Comments
No comments yet — be the first to post one!
Post a Comment