gpt4 book ai didi

org.apache.poi.xwpf.usermodel.XWPFPicture.getPictureData()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 02:05:05 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFPicture.getPictureData()方法的一些代码示例,展示了XWPFPicture.getPictureData()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWPFPicture.getPictureData()方法的具体详情如下:
包路径:org.apache.poi.xwpf.usermodel.XWPFPicture
类名称:XWPFPicture
方法名:getPictureData

XWPFPicture.getPictureData介绍

[英]Get the PictureData of the Picture, if present. Note - not all kinds of picture have data
[中]获取图片数据,如果有。注:并非所有类型的图片都有数据

代码示例

代码示例来源:origin: apache/tika

XWPFPictureData data = picture.getPictureData();
if (data != null) {
  AttributesImpl attr = new AttributesImpl();

代码示例来源:origin: stackoverflow.com

for ( XWPFRun run : par.getRuns() ) {
  for ( XWPFPicture picture : run.getEmbeddedPictures() ) {
    pictureData = picture.getPictureData();
    byte[] img = pictureData.getData();
    String fileName = pictureData.getFileName();

代码示例来源:origin: stackoverflow.com

XWPFDocument doc = new XWPFDocument(new FileInputStream(fileName));
     List<XWPFTable> table = doc.getTables();
     for (XWPFTable xwpfTable : table) {
       List<XWPFTableRow> row = xwpfTable.getRows();
       for (XWPFTableRow xwpfTableRow : row) {
         List<XWPFTableCell> cell = xwpfTableRow.getTableCells();
         for (XWPFTableCell xwpfTableCell : cell) {
           if (xwpfTableCell != null) {
             System.out.println(xwpfTableCell.getText());
             String s = xwpfTableCell.getText();
             for (XWPFParagraph p : xwpfTableCell.getParagraphs()) {
               for (XWPFRun run : p.getRuns()) {
                 for (XWPFPicture pic : run.getEmbeddedPictures()) {
                   byte[] pictureData = pic.getPictureData().getData();
                   System.out.println("picture : " + pictureData);
                 }
               }
             }
           }
         }
       }
     }

代码示例来源:origin: stackoverflow.com

XWPFDocument doc = new XWPFDocument(new FileInputStream(fileName));
 List<XWPFTable> table = doc.getTables();
 for (XWPFTable xwpfTable : table) {
   List<XWPFTableRow> row = xwpfTable.getRows();
   for (XWPFTableRow xwpfTableRow : row) {
     List<XWPFTableCell> cell = xwpfTableRow.getTableCells();
     for (XWPFTableCell xwpfTableCell : cell) {
       if (xwpfTableCell != null) {
         System.out.println(xwpfTableCell.getText());
         String s = xwpfTableCell.getText();
         for (XWPFParagraph p : xwpfTableCell.getParagraphs()) {
           for (XWPFRun run : p.getRuns()) {
             for (XWPFPicture pic : run.getEmbeddedPictures()) {
               byte[] pictureData = pic.getPictureData().getData();
               System.out.println("picture : " + pictureData);
             }
           }
         }
       }
     }
   }
 }

代码示例来源:origin: stackoverflow.com

if(pictures != null && !pictures.isEmpty()) {
  for (XWPFPicture picture : pictures) {
    XWPFPictureData data = picture.getPictureData();
    if(data != null) {
      result.add(data);

代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers

XWPFPictureData data = picture.getPictureData();
if (data != null) {
  AttributesImpl attr = new AttributesImpl();

代码示例来源:origin: org.apache.tika/tika-parsers

XWPFPictureData data = picture.getPictureData();
if (data != null) {
  AttributesImpl attr = new AttributesImpl();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com