C# 4.0 获取axAcroPDF1中的当前页码

C# 4.0 获取axAcroPDF1中的当前页码,c#-4.0,pdf,C# 4.0,Pdf,您好,我一直在尝试获取当前显示在查看器PDF中的页面的页码。 在这个论坛上有一个帖子有同样的问题,但这似乎是VB代码 我希望有人能帮助我: private void button1_Click(object sender, EventArgs e) { openFileDialog1.AddExtension = true; openFileDialog1.Filter = "PDF Files | *.pdf"; openFileDia

您好,我一直在尝试获取当前显示在查看器PDF中的页面的页码。 在这个论坛上有一个帖子有同样的问题,但这似乎是VB代码

我希望有人能帮助我:

 private void button1_Click(object sender, EventArgs e)
    {
        openFileDialog1.AddExtension = true;
        openFileDialog1.Filter = "PDF Files | *.pdf";
        openFileDialog1.Title = "Kies een bestand";

            try
            {
                openFileDialog1.ShowDialog();
                filename = openFileDialog1.FileName;

            }
            catch (Exception ex) 
            {
                MessageBox.Show(ex.Message);
                throw;
            }


        axAcroPDF1.setShowToolbar(false);
        axAcroPDF1.LoadFile(filename);
        axAcroPDF1.setShowScrollbars(false);
        axAcroPDF1.Show();


   }

我删除了标记iTextSharp,因为我没有看到任何引用iText或iTextSharp的代码。我使用PdfReader读取pdf。在代码示例中,这实际上没有显示。我想也许这可以用来得到当前的页码。你说的当前页码是什么意思?PdfReader是一个类文件,可以检查PDF,但PdfReader中没有当前页码。为什么会有?你是说有一个名为axAcroPDF1的产品使用iText来呈现pdf?我是指axAcroPDF1 pdf查看器中显示的当前页码。此处不使用iText库。我在另一部分中使用它来提取页面。