aspose的帮助里面有例子。
DocumentBuilder builder = new DocumentBuilder();
builder.Write("Image from local file: ");
builder.InsertImage(MyDir + "Aspose.Words.gif");
builder.Writeln();
builder.Write("Image from an internet url, automatically downloaded for you: ");
builder.InsertImage("http://www.aspose.com/Images/aspose-logo.jpg");
builder.Writeln();
builder.Document.Save(MyDir + "Image.CreateFromUrl Out.doc");
可以用书签,先用builder跳转到指定的书签,然后用InsertImage插入图片。
试过MoveToBookmark了不行的
Aspose.Words.DocumentBuilder builder2 = new Aspose.Words.DocumentBuilder(doc); Response.ContentType = "image/jpeg";//设定输出文件类型 //输出图象文件二进制数制 builder2.MoveToBookmark("userimage"); builder2.InsertImage((byte[])SqlReader["bmp"], 62.5, 87.5);
然后就是把书签替换掉就ok了