Package org.apache.poi.xslf

Examples of org.apache.poi.xslf.XSLFSlideShow


    }

    // TODO get rid of this method
    @Deprecated
    public XSLFSlideShow _getXSLFSlideShow() throws OpenXML4JException, IOException, XmlException{
        return new XSLFSlideShow(getPackage());
    }
View Full Code Here


  }
  public XSLFPowerPointExtractor(XSLFSlideShow slideshow) throws XmlException, IOException {
    this(new XMLSlideShow(slideshow.getPackage()));
  }
  public XSLFPowerPointExtractor(OPCPackage container) throws XmlException, OpenXML4JException, IOException {
    this(new XSLFSlideShow(container));
  }
View Full Code Here

      System.err.println("  XSLFPowerPointExtractor <filename.pptx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XSLFPowerPointExtractor(
          new XSLFSlideShow(args[0]));
    System.out.println(extractor.getText());
  }
View Full Code Here

  public String getText(boolean slideText, boolean notesText) {
    StringBuffer text = new StringBuffer();

    XSLFSlide[] slides = slideshow.getSlides();
        try {
            XSLFSlideShow xsl = new XSLFSlideShow(slideshow.getPackage());
            for (int i = 0; i < slides.length; i++) {
                CTSlideIdListEntry slideId = slideshow.getCTPresentation().getSldIdLst().getSldIdArray(i);

                // For now, still very low level
                CTNotesSlide notes =
                        xsl.getNotes(slideId);
                CTCommentList comments =
                        xsl.getSlideComments(slideId);

                if (slideText) {
                    extractText(new XSLFCommonSlideData(slides[i].getXmlObject().getCSld()), text);

                    // Comments too for the slide
View Full Code Here

   public Properties getProperties(InputStream is) throws IOException, DocumentReadException
   {
      POIPropertiesReader reader = new POIPropertiesReader();
      try
      {
         reader.readDCProperties(new XSLFSlideShow(OPCPackage.open(is)));
      }
      catch (InvalidFormatException e)
      {
         throw new DocumentReadException("Can't read properties from OOXML document", e);
      }
View Full Code Here

  }
  public XSLFPowerPointExtractor(XSLFSlideShow slideshow) throws XmlException, IOException {
    this(new XMLSlideShow(slideshow));
  }
  public XSLFPowerPointExtractor(Package container) throws XmlException, OpenXML4JException, IOException {
    this(new XSLFSlideShow(container));
  }
View Full Code Here

      System.err.println("  HXFPowerPointExtractor <filename.pptx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XSLFPowerPointExtractor(
          new XSLFSlideShow(args[0]));
    System.out.println(extractor.getText());
  }
View Full Code Here

  public void testPowerPoint() throws Exception {
    File f = new File(dirname, "PPTWithAttachments.pptx");
    assertTrue(f.exists());
   
    POIXMLDocument doc = new XSLFSlideShow(Package.open(f.toString()));
    test(doc, 4);
  }
View Full Code Here

     */
    @Override
    protected List<PackagePart> getMainDocumentParts() throws TikaException {
       List<PackagePart> parts = new ArrayList<PackagePart>();
       XMLSlideShow slideShow = (XMLSlideShow) extractor.getDocument();
       XSLFSlideShow document = null;
       try {
          document = slideShow._getXSLFSlideShow(); // TODO Avoid this in future
       } catch(Exception e) {
          throw new TikaException(e.getMessage()); // Shouldn't happen
       }
      
       for (CTSlideIdListEntry ctSlide : document.getSlideReferences().getSldIdList()) {
          // Add the slide
          PackagePart slidePart;
          try {
             slidePart = document.getSlidePart(ctSlide);
          } catch(IOException e) {
             throw new TikaException("Broken OOXML file", e);
          } catch(XmlException xe) {
             throw new TikaException("Broken OOXML file", xe);
          }
View Full Code Here

     * @see org.apache.poi.xslf.extractor.XSLFPowerPointExtractor#getText()
     */
    @Override
    protected void buildXHTML(XHTMLContentHandler xhtml) throws SAXException,
            XmlException, IOException {
        XSLFSlideShow slideShow = (XSLFSlideShow) extractor.getDocument();
        XMLSlideShow xmlSlideShow = new XMLSlideShow(slideShow);

        XSLFSlide[] slides = xmlSlideShow.getSlides();
        for (XSLFSlide slide : slides) {
            CTSlide rawSlide = slide._getCTSlide();
View Full Code Here

TOP

Related Classes of org.apache.poi.xslf.XSLFSlideShow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.