finding page number for a given PDPage object

  • 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


    • mtraut

      mtraut - 2008-10-01

      see getNodeIndex

    • john stalcup

      john stalcup - 2008-10-01

      ah thanks, that does it


Log in to post a comment.