• <menu id="w2i4a"></menu>
  • 首頁 > 慧問 > 頻道

    為什么無法將圖片導出到word,下為代碼

    發(fā)表于2019-05-10 回復:0 查看:2031  |  
    string tmppath = Server.MapPath("~/image.doc"); Document doc = new Document(tmppath); //載入模板 #region 圖片 DocumentBuilder builder = new DocumentBuilder(doc); Shape shape = new Shape(doc, ShapeType.Image); shape.ImageData.SetImage(Server.MapPath("~/Images/0.jpg")); shape.Width = 70; shape.Height = 70; shape.HorizontalAlignment = HorizontalAlignment.Right; //靠右對齊 builder.MoveToBookmark("image"); builder.InsertNode(shape); Bookmark myname = doc.Range.Bookmarks["image"]; myname.Text = ""; doc.Range.Bookmarks["image"].Remove(); doc.Save("demo.doc", SaveFormat.Doc, SaveType.OpenInWord, Response); #endregion
    0個回答

    打破零回復...

    回復

    登錄 慧都網(wǎng)發(fā)表評論

    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();