Get List of the Fonts from the PDF File
PdfExtractor class provides a method named get Fonts to get a list of all the fonts from the PDF file. The get Fonts method returns a Set which can be iterated to get the fonts from the list.
PdfExtractor class provides a method named get Fonts to get a list of all the fonts from the PDF file. The get Fonts method returns a Set which can be iterated to get the fonts from the list.
This example shows you how to get list of the fonts from the PDF file.
[Java]
//create PdfExtractor object PdfExtractor pdfExtractor = new PdfExtractor(); //bind input PDF file pdfExtractor.bindPdf("easya.pdf"); //get fonts list Set resSet = pdfExtractor.getFonts(); //iterating over the elements in the set Iterator it = resSet.iterator(); while (it.hasNext()) { //get and display element Object element = it.next(); System.out.println(element); }
