Examples of XSLFSlideShow


Examples of org.apache.poi.xslf.XSLFSlideShow

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

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

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

Examples of org.apache.poi.xslf.XSLFSlideShow

  }
  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

Examples of org.apache.poi.xslf.XSLFSlideShow

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

Examples of org.apache.poi.xslf.XSLFSlideShow

     */
    @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

Examples of org.apache.poi.xslf.XSLFSlideShow

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

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

Examples of org.apache.poi.xslf.XSLFSlideShow

   */
  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

Examples of org.apache.poi.xslf.XSLFSlideShow

   private POIDataSamples slTests = POIDataSamples.getSlideShowInstance();

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

Examples of org.apache.poi.xslf.XSLFSlideShow

        "\n\n\n\n", text
    );
  }
 
   public void testGetComments() throws Exception {
      XSLFSlideShow xml =
         new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream("45545_Comment.pptx")));
      XSLFPowerPointExtractor extractor =
         new XSLFPowerPointExtractor(xml);

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

Examples of org.apache.poi.xslf.XSLFSlideShow

      // Check the authors came through too
      assertTrue("Unable to find expected word in text\n" + text, text.contains("XPVMWARE01"));
   }
 
  public void testGetMasterText() throws Exception {
      XSLFSlideShow xml =
         new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream("WithMaster.pptx")));
      XSLFPowerPointExtractor extractor =
         new XSLFPowerPointExtractor(xml);
      extractor.setSlidesByDefault(true);
      extractor.setNotesByDefault(false);
      extractor.setMasterByDefault(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.