im trying to get the first and last page label of my pdf file. but im currently having an issue when accessing a PDF File that starts with a page label of "1" it always returns a null pointer exception
pdfDocument = PDDocument.load(pdfFilePath);
pageLabels = pdfDocument.getDocumentCatalog().getPageLabels();
pdfl = pdfDocument.getDocumentCatalog().getPageLabels();
setfPage(Double.parseDouble(pdfl.getLabelsByPageIndices()[0]));
setlPage(Double.parseDouble(pdfl.getLabelsByPageIndices()pdfDocument.getNumberOfPages() - 1]));
it works fine on other pdf files that doesn't start with "1" as page label.