title: How to read text in XSLFGraphicFrame with Apache POI for PowerPoint
body: <p>I'm making a Java program to find occurrrences of a particular keyword in documents. I want to read many types of file format, including all Microsoft Office documents. </p>
  
  <p>I already made it with all of them except for PowerPoint ones, I'm using Apache POI code snippets found on StackOverflow or on other sources.
  I discovered all slides are made of shapes (XSLFTextShape) but many of them are objects of class XSLFGraphicFrame or XSLFTable for which I can't use simply the toString() methods. How can I extract all of the text contained in them using Java.
  This is the piece of code\pseudocode:</p>
  
  <pre><code>File f = new File("C:\\Users\\Windows\\Desktop\\Modulo 9.pptx");
  PrintStream out = System.out;
  
  FileInputStream is = new FileInputStream(f);
  XMLSlideShow ppt = new XMLSlideShow(is);
  for (XSLFSlide slide : ppt.getSlides()) {
      for (XSLFShape shape : slide) {
         if (shape instanceof XSLFTextShape) {
         XSLFTextShape txShape = (XSLFTextShape) shape;
         out.println(txShape.getText());
         } else if (shape instanceof XSLFPictureShape) {
          //do nothing
         } else if (shape instanceof XSLFGraphicFrame or XSLFTable ) {
         //print all text in it or in its children
         }
      }
  }
  </code></pre>