Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to get a pdf embedded fonts using PDFBOX0.8.0
- FileInputStream pdfFile = new FileInputStream("C:/work/pdf2tiff/test.PDF");
- PDDocument pdDocument = PDDocument.load(pdfFile, true);
- PDDocumentCatalog catalog = pdDocument.getDocumentCatalog();
- List pages = catalog.getAllPages();
- if (pages != null && pages.size() > 0) {
- for (int i = 0; i < pages.size(); i++) {
- PDPage page = (PDPage) pages.get(i);
- Map fonts = page.getResources().getFonts();
- System.out.println("fonts=" + fonts);
Add Comment
Please, Sign In to add comment