Free Support Forum - aspose.com

Formatting contents on Notes - Bold/Italic/Underline

Hi,
Is it possible to apply basic formatting(Bold/Italic/Underline ) to the Notes content ?

Paragraph para3 = new Paragraph();
Portion p3 = new Portion();
p3.setText("Styled text on Notes");
p3.setFontBold(true);
p3.setFontItalic(true
);
p3.setFontUnderline(true
);

para3.getPortions().add(p3);
stSld2.addNotes();
stSld2.getNotes().getParagraphs().clear();
stSld2.getNotes().getParagraphs().add(para3);

The above code adds the content to Notes, but unformatted.

-Muhammed

Hi Muhammed,

The following code will work:

Presentation pres=new Presentation();

Slide sld=pres.getSlideByPosition(1);

Notes nt = sld.addNotes();

nt.setText("My Name is Muhammad Sabir");

nt.getParagraphs().get(0).getPortions().get(0).setFontBold(true);

pres.write("ntPPT.ppt");