@Test public void noExceptionMissingFonts() { PDDocument doc = new PDDocument(); PDPage page0 = new PDPage(); COSDictionary rootRes = new COSDictionary(); page0.getCOSObject().setItem(COSName.RESOURCES, rootRes); rootRes.setItem(COSName.FONT, null); doc.getDocumentCatalog().getPages().add(page0); new ResourceDictionaryCleaner().accept(doc); }
@Override public void accept(PDDocument p) { LOG.debug("Cleaning resource dictionaries from unused resources"); clean(p.getPages().streamNodes()); }
ResourceDictionaryCleaner implements Consumer<PDDocument> { @Override public void accept(PDDocument p) { LOG.debug("Cleaning resource dictionaries from unused resources"); clean(p.getPages().streamNodes()); } }
ResourceDictionaryCleaner implements Consumer<PDDocument> { @Override public void accept(PDDocument p) { LOG.debug("Cleaning resource dictionaries from unused resources"); clean(p.getPages().streamNodes()); }  }
ResourceDictionaryCleaner implements Consumer<PDDocument> { @Override public void accept(PDDocument p) { LOG.debug("Cleaning resource dictionaries from unused resources"); clean(p.getPages().streamNodes()); }  @Override void accept(PDDocument p); void clean(PDPage page); }
ResourceDictionaryCleaner implements Consumer<PDDocument> { @Override public void accept(PDDocument p) { LOG.debug("Cleaning resource dictionaries from unused resources"); clean(p.getPages().streamNodes()); }  @Override void accept(PDDocument p); void clean(PDPage page);  }