First page of com.sun.pdfview.PDFFile has page number 1, not 0

With the current implementation both page 0 and page 1 will be the first page in the file, while page 2 will be the second page and so on. The effect is that the last page is never compared.