org.apache.poi.hslf.extractor

## Class PowerPointExtractor

- java.lang.Object
- - org.apache.poi.extractor.POITextExtractor
  - - org.apache.poi.extractor.POIOLE2TextExtractor
    - - org.apache.poi.hslf.extractor.PowerPointExtractor

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

  Deprecated.
  in POI 4.0.0, use `SlideShowExtractor` instead

      @Deprecated
       @Removal(version="5.0.0")
      public final class PowerPointExtractor
      extends POIOLE2TextExtractor

  This class can be used to extract text from a PowerPoint file. Can optionally also get the notes from one.

- - ### Field Summary

    - ### Fields inherited from class org.apache.poi.extractor.POIOLE2TextExtractor

      `document`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PowerPointExtractor(DirectoryNode dir)` Deprecated. Creates a PowerPointExtractor, from a specific place inside an open `POIFSFileSystem`
    `PowerPointExtractor(HSLFSlideShow slideShow)` Deprecated.
    `PowerPointExtractor(HSLFSlideShowImpl ss)` Deprecated. Creates a PowerPointExtractor, from a HSLFSlideShow
    `PowerPointExtractor(java.io.InputStream iStream)` Deprecated. Creates a PowerPointExtractor, from an Input Stream
    `PowerPointExtractor(POIFSFileSystem fs)` Deprecated. Creates a PowerPointExtractor, from an open POIFSFileSystem
    `PowerPointExtractor(java.lang.String fileName)` Deprecated. Creates a PowerPointExtractor, from a file

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getNotes()` Deprecated. Fetches all the notes text from the slideshow, but not the slide text
    `java.util.List<HSLFObjectShape>` | `getOLEShapes()` Deprecated.
    `java.lang.String` | `getText()` Deprecated. Fetches all the slide text from the slideshow, but not the notes, unless you've called setSlidesByDefault() and setNotesByDefault() to change this
    `java.lang.String` | `getText(boolean getSlideText, boolean getNoteText)` Deprecated. Fetches text from the slideshow, be it slide text or note text.
    `java.lang.String` | `getText(boolean getSlideText, boolean getNoteText, boolean getCommentText, boolean getMasterText)` Deprecated.
    `static void` | `main(java.lang.String[] args)` Deprecated. Basic extractor.
    `void` | `setCommentsByDefault(boolean commentsByDefault)` Deprecated. Should a call to getText() return comments text? Default is no
    `void` | `setMasterByDefault(boolean masterByDefault)` Deprecated. Should a call to getText() return text from master? Default is no
    `void` | `setNotesByDefault(boolean notesByDefault)` Deprecated. Should a call to getText() return notes text? Default is no
    `void` | `setSlidesByDefault(boolean slidesByDefault)` Deprecated. Should a call to getText() return slide text? Default is yes

    - ### Methods inherited from class org.apache.poi.extractor.POIOLE2TextExtractor

      `getDocSummaryInformation, getDocument, getMetadataTextExtractor, getRoot, getSummaryInformation`

    - ### Methods inherited from class org.apache.poi.extractor.POITextExtractor

      `close, setFilesystem`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PowerPointExtractor

          public PowerPointExtractor(HSLFSlideShow slideShow)

      Deprecated.

    - #### PowerPointExtractor

          public PowerPointExtractor(java.lang.String fileName)
                              throws java.io.IOException

      Deprecated.
      Creates a PowerPointExtractor, from a file
      Parameters:
        `fileName` - The name of the file to extract from
      Throws:
        `java.io.IOException`

    - #### PowerPointExtractor

          public PowerPointExtractor(java.io.InputStream iStream)
                              throws java.io.IOException

      Deprecated.
      Creates a PowerPointExtractor, from an Input Stream
      Parameters:
        `iStream` - The input stream containing the PowerPoint document
      Throws:
        `java.io.IOException`

    - #### PowerPointExtractor

          public PowerPointExtractor(POIFSFileSystem fs)
                              throws java.io.IOException

      Deprecated.
      Creates a PowerPointExtractor, from an open POIFSFileSystem
      Parameters:
        `fs` - the POIFSFileSystem containing the PowerPoint document
      Throws:
        `java.io.IOException`

    - #### PowerPointExtractor

          public PowerPointExtractor(DirectoryNode dir)
                              throws java.io.IOException

      Deprecated.
      Creates a PowerPointExtractor, from a specific place inside an open `POIFSFileSystem`
      Parameters:
        `dir` - the POIFS Directory containing the PowerPoint document
      Throws:
        `java.io.IOException`

    - #### PowerPointExtractor

          public PowerPointExtractor(HSLFSlideShowImpl ss)

      Deprecated.
      Creates a PowerPointExtractor, from a HSLFSlideShow
      Parameters:
        `ss` - the HSLFSlideShow to extract text from

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.io.IOException

      Deprecated.
      Basic extractor. Returns all the text, and optionally all the notes
      Throws:
        `java.io.IOException`

    - #### setSlidesByDefault

          public void setSlidesByDefault(boolean slidesByDefault)

      Deprecated.
      Should a call to getText() return slide text? Default is yes

    - #### setNotesByDefault

          public void setNotesByDefault(boolean notesByDefault)

      Deprecated.
      Should a call to getText() return notes text? Default is no

    - #### setCommentsByDefault

          public void setCommentsByDefault(boolean commentsByDefault)

      Deprecated.
      Should a call to getText() return comments text? Default is no

    - #### setMasterByDefault

          public void setMasterByDefault(boolean masterByDefault)

      Deprecated.
      Should a call to getText() return text from master? Default is no

    - #### getText

          public java.lang.String getText()

      Deprecated.
      Fetches all the slide text from the slideshow, but not the notes, unless you've called setSlidesByDefault() and setNotesByDefault() to change this
      Specified by:
        `getText` in class `POITextExtractor`
      Returns:
        All the text from the document

    - #### getText

          public java.lang.String getText(boolean getSlideText,
                                          boolean getNoteText)

      Deprecated.
      Fetches text from the slideshow, be it slide text or note text. Because the final block of text in a TextRun normally have their last \n stripped, we add it back
      Parameters:
        `getSlideText` - fetch slide text
        `getNoteText` - fetch note text

    - #### getText

          public java.lang.String getText(boolean getSlideText,
                                          boolean getNoteText,
                                          boolean getCommentText,
                                          boolean getMasterText)

      Deprecated.

    - #### getNotes

          public java.lang.String getNotes()

      Deprecated.
      Fetches all the notes text from the slideshow, but not the slide text

    - #### getOLEShapes

          public java.util.List<HSLFObjectShape> getOLEShapes()

      Deprecated.

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.