public int addFontDictionary() throws IOException {
  Collection<Entry> fonts=getEntries();
  if (fonts.size() > 0) {
    PDFDictionary fontList=pdf.openDictionary("FontList");
    for (Iterator<Entry> i=fonts.iterator(); i.hasNext(); ) {
      Entry e=(Entry)i.next();
      fontList.entry(e.getReference(),pdf.ref(e.getReference()));
    }
    pdf.close(fontList);
  }
  return fonts.size();
}

public int addFontDictionary ( ) throws IOException { Collection < Entry > fonts = getEntries ( ) ; if ( fonts . size ( ) > 0 ) { PDFDictionary fontList = pdf . openDictionary ( "FontList" ) ; for ( Iterator < Entry > i = fonts . iterator ( ) ; i . hasNext ( ) ; ) { Entry e = ( Entry ) i . next ( ) ; fontList . entry ( e . getReference ( ) , pdf . ref ( e . getReference ( ) ) ) ; } pdf . close ( fontList ) ; } return fonts . size ( ) ; }
adds all fonts to a dictionary named " fontlist " .
