彩票走势图

彩票走势图 > 慧问 > 频道

为什么无法将图片导出到word,下为代码

发表于2019-05-10 回复:0 查看:2127  |  
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个回答

打破零回复...

回复

登录 慧都网发表评论

扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP