https://issues.apache.org/bugzilla/show_bug.cgi?id=52244
Bug #: 52244
Summary: The method getFontName() & getFontSize() returns error
value.
Product: POI
Version: 3.8-dev
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSLF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27984
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27984
Attachment is the template file.
The template font is Arial, but the program says it's Times New Roman.
String url = "D:\\Temp\\template.ppt";
org.apache.poi.hslf.HSLFSlideShow hslf = null;
try {
hslf = new HSLFSlideShow(url);
} catch (IOException e) {
e.printStackTrace();
}
org.apache.poi.hslf.usermodel.SlideShow slidePPT = new
org.apache.poi.hslf.usermodel.SlideShow(hslf);
org.apache.poi.hslf.model.Slide[] slides = slidePPT.getSlides();
for(org.apache.poi.hslf.model.Slide slide: slides){
TextRun[] textRuns = slide.getTextRuns();
for(TextRun rt : textRuns){
RichTextRun[] rtrs = rt.getRichTextRuns();
for(RichTextRun rtr : rtrs){
System.out.println("Text: " + rtr.getText());
System.out.println("Color: " + rtr.getFontColor());
System.out.println("FontName: " + rtr.getFontName());
System.out.println("FontSize: " + rtr.getFontSize());
System.out.println("Alignment: " + rtr.getAlignment());
System.out.println();
}
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]