Examples of Inline


Examples of org.docx4j.dml.wordprocessingDrawing.Inline

      if (doc instanceof HWPFDocument
          && ((HWPFDocument) doc).getPicturesTable().hasPicture(run)) {
       
        Picture picture = doc.getPicturesTable().extractPicture(run,
            true);
        Inline inline;
        try {
          BinaryPartAbstractImage imagePart = BinaryPartAbstractImage
              .createImagePart(wordMLPackage, picture.getContent());

          long cx = UnitsOfMeasurement
View Full Code Here

Examples of org.docx4j.dml.wordprocessingDrawing.Inline

      String filenameHint, String altText,
      int id1, int id2) throws Exception {
   
        BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
   
        Inline inline = imagePart.createImageInline( filenameHint, altText,
          id1, id2, false);
       
        // Now add the inline in w:p/w:r/w:drawing
    org.docx4j.wml.ObjectFactory factory = Context.getWmlObjectFactory();
    org.docx4j.wml.P  p = factory.createP();
View Full Code Here

Examples of org.docx4j.dml.wordprocessingDrawing.Inline

      String filenameHint, String altText,
      int id1, int id2, long cx) throws Exception {
   
        BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
   
        Inline inline = imagePart.createImageInline( filenameHint, altText,
          id1, id2, cx, false);
       
        // Now add the inline in w:p/w:r/w:drawing
    org.docx4j.wml.ObjectFactory factory = Context.getWmlObjectFactory();
    org.docx4j.wml.P  p = factory.createP();
View Full Code Here

Examples of org.docx4j.dml.wordprocessingDrawing.Inline

      //being assigned to this InlineDrawingML object.
      //See: RunML.initChildren().
      throw new IllegalArgumentException("Unsupported Docx Object = " + o);     
    }
   
    Inline inline = (Inline) list.get(0);
//    if (inline.getExtent() != null) {
//      int cx = Long.valueOf(inline.getExtent().getCx()).intValue();
//      cx = StyleSheet.emuToPixels(cx);
//      int cy = Long.valueOf(inline.getExtent().getCy()).intValue();
//      cy = StyleSheet.emuToPixels(cy);
//      //this.extentInPixels = new Dimension(cx, cy);
//    }
   
    if (inline.getEffectExtent() != null) {
      //this.effectExtent = new CTEffectExtent(inline.getEffectExtent());
    }
   
    if (inline.getGraphic() != null) {
     
      byte[] imagedata = BinaryPartAbstractImage.getImage(wordMLPackage,
          inline.getGraphic() );
      Image img = Image.getInstance( imagedata );
      if (paraParent instanceof Document) {       
        ((Document)paraParent).add(img);
      } else if (paraParent instanceof PdfPTable) {       
        ((PdfPTable)paraParent).addCell(img);
View Full Code Here

Examples of org.docx4j.dml.wordprocessingDrawing.Inline

      int id1, int id2) throws Exception {
   
        BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage,
            sourcePart, bytes);
   
        Inline inline = imagePart.createImageInline( filenameHint, altText,
          id1, id2, false);
       
        // Now add the inline in w:p/w:r/w:drawing
    org.docx4j.wml.ObjectFactory factory = Context.getWmlObjectFactory();
    org.docx4j.wml.P  p = factory.createP();
View Full Code Here

Examples of org.docx4j.dml.wordprocessingDrawing.Inline

    public void inlineToDocx(WordprocessingMLPackage wordPackage, Text text, Object paramValue, Matcher paramsMatcher) {
        try {
            Image image = new Image(paramValue, paramsMatcher);
            if (image.isValid()) {
                BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordPackage, image.imageContent);
                Inline inline = imagePart.createImageInline("", "", docxUniqueId1++, docxUniqueId2++, false);
                ImageSize oldSize = imagePart.getImageInfo().getSize();
                double widthExtent = (double) image.width / oldSize.getWidthPx();
                double heightExtent = (double) image.height / oldSize.getHeightPx();
                inline.getExtent().setCx((long) (inline.getExtent().getCx() * widthExtent));
                inline.getExtent().setCy((long) (inline.getExtent().getCy() * heightExtent));
                org.docx4j.wml.Drawing drawing = new org.docx4j.wml.ObjectFactory().createDrawing();
                R run = (R) text.getParent();
                run.getContent().add(drawing);
                drawing.getAnchorOrInline().add(inline);
                text.setValue("");
View Full Code Here

Examples of org.foray.fotree.fo.obj.Inline

        }
        case INITIAL_PROPERTY_SET: {
            return new InitialPropertySet(parent, propertyList);
        }
        case INLINE: {
            return new Inline(parent, propertyList);
        }
        case INLINE_CONTAINER: {
            return new InlineContainer(parent, propertyList);
        }
        case INSTREAM_FOREIGN_OBJECT: {
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.