Package org.apache.poi.xslf

Examples of org.apache.poi.xslf.XSLFSlideShow


      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


        );
    test(doc, 5);
  }

  public void testPowerPoint() throws Exception {
    POIXMLDocument doc = new XSLFSlideShow(OPCPackage.open(
                POIDataSamples.getSlideShowInstance().openResourceAsStream("PPTWithAttachments.pptm"))
        );
    test(doc, 4);
  }
View Full Code Here

   */
  public void testWithSomeNulls() throws Exception {
      OPCPackage pkg = OPCPackage.open(
            _slSamples.openResourceAsStream("49386-null_dates.pptx")
      );
      XSLFSlideShow sl = new XSLFSlideShow(pkg);
  
      POIXMLPropertiesTextExtractor ext = new POIXMLPropertiesTextExtractor(sl);
      ext.getText();
     
      String text = ext.getText();
View Full Code Here

  private OPCPackage pkg;

  protected void setUp() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    pkg = OPCPackage.open(slTests.openResourceAsStream("sample.pptx"));
    xmlA = new XSLFSlideShow(pkg);
  }
View Full Code Here

    );
  }
 
  public void testGetComments() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    xmlA = new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream("45545_Comment.pptx")));
    XSLFPowerPointExtractor extractor =
      new XSLFPowerPointExtractor(xmlA);
   
    String text = extractor.getText();
    assertTrue(text.length() > 0);
View Full Code Here

    assertTrue("Unable to find expected word in text\n" + text, text.contains("testdoc"));
  }

    public void testTable() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
        xmlA = new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream("present1.pptx")));
        XSLFPowerPointExtractor extractor =
            new XSLFPowerPointExtractor(xmlA);

        String text = extractor.getText();
        assertTrue(text.length() > 0);
View Full Code Here

             "thmx",
             //"xps" // Doesn't have a core document
       };
       for(String extension : extensions) {
          String filename = "testPPT." + extension;
          xmlA = new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream(filename)));
          XSLFPowerPointExtractor extractor =
             new XSLFPowerPointExtractor(xmlA);

         String text = extractor.getText();
         if(extension.equals("thmx")) {
View Full Code Here

        );
    test(doc, 5);
  }

  public void testPowerPoint() throws Exception {
    POIXMLDocument doc = new XSLFSlideShow(OPCPackage.open(
                POIDataSamples.getSlideShowInstance().openResourceAsStream("PPTWithAttachments.pptm"))
        );
    test(doc, 4);
  }
View Full Code Here

   */
  public void testWithSomeNulls() throws Exception {
      OPCPackage pkg = OPCPackage.open(
            _slSamples.openResourceAsStream("49386-null_dates.pptx")
      );
      XSLFSlideShow sl = new XSLFSlideShow(pkg);
  
      POIXMLPropertiesTextExtractor ext = new POIXMLPropertiesTextExtractor(sl);
      ext.getText();
     
      String text = ext.getText();
View Full Code Here

                HSLFSlideShow slideShow = new HSLFSlideShow(pPart.getInputStream());
            }
            // PowerPoint Document - OpenXML file format
            else if (contentType.equals("application/vnd.openxmlformats-officedocument.presentationml.presentation")) {
                OPCPackage docPackage = OPCPackage.open(pPart.getInputStream());
                XSLFSlideShow slideShow = new XSLFSlideShow(docPackage);
            }
            // Any other type of embedded object.
            else {
                System.out.println("Unknown Embedded Document: " + contentType);
                InputStream inputStream = pPart.getInputStream();
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.