finding page number for a given PDPage object

Help
2008-10-01
2013-05-28
  • john stalcup
    john stalcup
    2008-10-01

    given a PDDocument object and a PDPage object from somewhere within this PDDocument object's page tree, is there a utility function that will tell me what the page number for this PDPage object is?

    i figure i can repeatedly call PDPage.getPreviousPage() until i reach the beginning, and log how many times i called it. but it would be nice if there is a builtin method that i am just not noticing

    John

     
    • mtraut
      mtraut
      2008-10-01

      see getNodeIndex

       
    • john stalcup
      john stalcup
      2008-10-01

      ah thanks, that does it