本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlide.getShapes()
方法的一些代码示例,展示了XSLFSlide.getShapes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFSlide.getShapes()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFSlide
类名称:XSLFSlide
方法名:getShapes
暂无
代码示例来源:origin: apache/tika
extractContent(slide.getShapes(), false, xhtml, slideDesc);
xhtml.endElement("div");
代码示例来源:origin: Texera/texera
/**
* Extracts data from PPT/PPTX from using poi.
*
* @param path
* @return
* @throws DataflowException
*/
public static String extractPPTFile(Path path) throws DataflowException {
try (FileInputStream inputStream = new FileInputStream(path.toString());
XMLSlideShow ppt = new XMLSlideShow(inputStream)) {
StringBuffer res = new StringBuffer();
for (XSLFSlide slide : ppt.getSlides()) {
List<XSLFShape> shapes = slide.getShapes();
for (XSLFShape shape : shapes) {
if (shape instanceof XSLFTextShape) {
XSLFTextShape textShape = (XSLFTextShape) shape;
String text = textShape.getText();
res.append(text);
}
}
}
return res.toString();
} catch (IOException e) {
throw new DataflowException(e);
}
}
代码示例来源:origin: graphaware/neo4j-nlp
@Override
public List<Page> parse(InputStream fs, List<String> filterPatterns) throws Exception {
List<Page> pages = new ArrayList<>();
XMLSlideShow ppt = new XMLSlideShow(fs);
ppt.getSlides().forEach(slide -> {
Page page = new Page(slide.getSlideNumber());
for (XSLFShape shape : slide.getShapes()) {
if (shape instanceof XSLFTextShape) {
page.getParagraphs().add(((XSLFTextShape) shape).getText());
}
}
pages.add(page);
});
return pages;
}
}
代码示例来源:origin: org.apache.poi/poi-examples
System.out.println("Title: " + slide.getTitle());
for (XSLFShape shape : slide.getShapes()) {
if (shape instanceof XSLFTextShape) {
XSLFTextShape tsh = (XSLFTextShape) shape;
代码示例来源:origin: stackoverflow.com
XSLFSlide[] slides = ppt.getSlides();
XSLFSlide slide1 =slides[0];
XSLFShape shapes[]= slide1.getShapes();
for(int i=0;i<shapes.length;i++){
System.out.println(shapes[i].getShapeName());
代码示例来源:origin: org.apache.tika/tika-parsers
extractContent(slide.getShapes(), false, xhtml, slideDesc);
xhtml.endElement("div");
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers
extractContent(slide.getShapes(), false, xhtml, slideDesc);
xhtml.endElement("div");
内容来源于网络,如有侵权,请联系作者删除!