We don't yet have a nice usermodel API to work with fonts.
Here is how you can use low-level HSLF API to access font records:
public static void main(String[] args) throws Exception {
SlideShow ppt = new SlideShow(new FileInputStream(args[0]));
FontCollection fonts =
ppt.getDocumentRecord().getEnvironment().getFontCollection();
Record[] child = fonts.getChildRecords();
for (int i = 0; i < child.length; i++) {
if(child[i] instanceof FontEntityAtom){
FontEntityAtom fontatom = (FontEntityAtom)child[i];
System.out.println(fontatom.getFontName());
}
}
}
Yegor
> Hello everyone,
> I want to get all the font names used in a presentation. In the
> POI tutorial I found that PowerPoint stores information about the
> fonts used in FontEntityAtom and also FontCollection ia a container
> that holds information about all the fonts in the presentation. Can
> anyone tell me which one to use to get the required information. A
> simple code snippet to show the usage would be of help.
>
> Thanking
> pal
>
> ---------------------------------
> Never miss a thing. Make Yahoo your homepage.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]