Examples of XSSFDrawing


Examples of org.apache.poi.xssf.usermodel.XSSFDrawing

                text.append("\n");
            }
           
            // add textboxes
            if (includeTextBoxes){
                XSSFDrawing drawing = sheet.createDrawingPatriarch();
                for (XSSFShape shape : drawing.getShapes()){
                    if (shape instanceof XSSFSimpleShape){
                        String boxText = ((XSSFSimpleShape)shape).getText();
                        if (boxText.length() > 0){
                            text.append(boxText);
                            text.append('\n');
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFDrawing

              PackageRelationshipCollection drawingsList = sheetPkg.getRelationshipsByType(XSSFRelation.DRAWINGS.getRelation());
              for (int i = 0; i < drawingsList.size(); i++){
                  PackageRelationship drawings = drawingsList.getRelationship(i);
                  PackagePartName drawingsName = PackagingURIHelper.createPartName(drawings.getTargetURI());
                  PackagePart drawingsPart = sheetPkg.getPackage().getPart(drawingsName);
                  XSSFDrawing drawing = new XSSFDrawing(drawingsPart, drawings);
                  for (XSSFShape shape : drawing.getShapes()){
                      shapes.add(shape);
                  }
              }
           } catch (XmlException e){
               return null;
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFDrawing

                text.append("\n");
            }
           
            // add textboxes
            if (includeTextBoxes){
                XSSFDrawing drawing = sheet.createDrawingPatriarch();
                for (XSSFShape shape : drawing.getShapes()){
                    if (shape instanceof XSSFSimpleShape){
                        String boxText = ((XSSFSimpleShape)shape).getText();
                        if (boxText.length() > 0){
                            text.append(boxText);
                            text.append('\n');
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFDrawing

      //int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();

      // if ((width != 0) && (height != 0)) {
      // picture.getImageDimension().setSize(width, height);
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFDrawing

    public static Map<String, PictureData> getSheetPictrues07
            XSSFSheet sheet, XSSFWorkbook workbook) { 
        Map<String, PictureData> sheetIndexPicMap = new HashMap<String, PictureData>()
        for (POIXMLDocumentPart dr : sheet.getRelations()) { 
            if (dr instanceof XSSFDrawing) { 
                XSSFDrawing drawing = (XSSFDrawing) dr; 
                List<XSSFShape> shapes = drawing.getShapes()
                for (XSSFShape shape : shapes) { 
                    XSSFPicture pic = (XSSFPicture) shape; 
                    XSSFClientAnchor anchor = pic.getPreferredSize()
                    CTMarker ctMarker = anchor.getFrom()
                    String picIndex = ctMarker.getRow() + "_" + ctMarker.getCol()
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFDrawing

      // int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();

      // if ((width != 0) && (height != 0)) {
      // picture.getImageDimension().setSize(width, height);
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFDrawing

      // int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();

      // if ((width != 0) && (height != 0)) {
      // picture.getImageDimension().setSize(width, height);
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.