OK, here's my solution, using XMLSlideShow#getNotesSlide(XSLFSlide slide), 
which works but feels a bit kludgy, so maybe I'm missing a better way to get 
the appropriate placeholder from the XSLFNotes object?

      List<XSLFShape> shapes = pptxNotes.getShapes();
      XSLFTextShape shape = null;
      for (XSLFShape cand : shapes) {
        String shapeName = cand.getShapeName();
        if (shapeName.startsWith("Notes Placeholder")) {
          shape = (XSLFTextShape)cand;
          break;
        }
      }

I can then add paragraphs to the shape using my normal paragraph-adding code.

Cheers,

E.
--
Eliot Kimber
http://contrext.com
 

On 5/4/19, 10:11 AM, "Eliot Kimber" <[email protected]> wrote:

    I may have spoken too soon--looks like I'm actually getting the notes for 
the slide I'm constructing but the paragraphs I'm adding are not in the right 
place or don't have the right properties (they don't show up when I view the 
PPTX in PowerPoint but they are in the slide note XML).
    
    So looks like it's just my user error, which is good.
    
    Cheers,
    
    E.
    --
    Eliot Kimber
    http://contrext.com
     
    
    On 5/4/19, 9:58 AM, "Eliot Kimber" <[email protected]> wrote:
    
        getNotesSlide() does get me an XSLFNotes instance and I can then add 
content to it, but as Andreas points out, addNotes() is a no-op (
        
        I'll see if I can puzzle out what's involved in adding the notes object 
to a slide.
        
        Cheers,
        
        E.
        
        --
        Eliot Kimber
        http://contrext.com
         
        
        On 5/2/19, 3:23 PM, "pj.fanning" <[email protected]> wrote:
        
            Have you tried XMLSlideShow#getNotesSlide(XSLFSlide slide)?
            
            
            
            --
            Sent from: 
http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
            
            
---------------------------------------------------------------------
            To unsubscribe, e-mail: [email protected]
            For additional commands, e-mail: [email protected]
            
            
            
        
        
        
        ---------------------------------------------------------------------
        To unsubscribe, e-mail: [email protected]
        For additional commands, e-mail: [email protected]
        
        
        
    
    
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
    
    
    



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to