Copying Notes from a slide to another?


I’m trying to copy the notes from a source slide to a copy of that slide to a new presentation via .getNotes().setText() method. But it appears that the notes on the targetPresentation will only have the first line or paragraph of text from the source notes. Do I need to loop through the paragaph objects and add them to the target Notes object?



I got this to work with by iterating thru the paragraph objects from the source and adding them to them to the target…

Paragraphs ps = srcSlide.getNotes().getParagraphs();
if(ps != null) {
Paragraphs tgtParagraphs = targetPres.getSlideByPosition(1).getNotes().getParagraphs();

for (int p = 0; p < ps.size(); p ++) {
Paragraph paragraph = new Paragraph(ps.get§);
tgtParagraphs.add(p, paragraph);