final List pages = getPDFDocument().getDocumentCatalog().getAllPages();
for (final ListIterator iter = pages.listIterator(); iter.hasNext();)
{
final PDPage page = (PDPage) iter.next();
try {
for (final Iterator fontIterator = page.findResources().getFonts().values().iterator();
fontIterator.hasNext();) {
final PDFont font = (PDFont) fontIterator.next();
fonts.add(new PDFBoxPDFFont(font, iter.nextIndex())); // nextIndex() because page number start with 1 not 0
}
}