我遇到了麻烦。
我创建了一个项目,我需要通过将图像插入页面底部来更改MS Word文档的每个页面。我可以使用Spire.DOC
将图像插入页脚,但每个页面的图像都相同。所以问题是在每个页面上插入不同的图像。任何人都可以帮助我如何实施它?谢谢!
示例,如何使用Spire.DOC插入图像
//Insert an image into footer paragraph
Paragraph footer = footer.AddParagraph();
DocPicture image = footer.AppendPicture(Image.FromFile("some_image.jpg");
//The alignment of the footer picture
image.TextWrappingStyle = TextWrappingStyle.Behind;
image.HorizontalOrigin = HorizontalOrigin.Page;
image.HorizontalAlignment = ShapeHorizontalAlignment.Center;
image.VerticalOrigin = VerticalOrigin.Page;
image.VerticalAlignment = ShapeVerticalAlignment.Bottom;
//Set the text of the footer
TextRange text = footer.AppendText("some_document.Doc";
text.CharacterFormat.FontName = "Arial";
text.CharacterFormat.FontSize = 11;
text.CharacterFormat.Italic = false;
footer.Format.HorizontalAlignment = Spire.Doc.Documents.HorizontalAlignment.Center;
//Add a border of the footer
footer.Format.Borders.Bottom.BorderType = Spire.Doc.Documents.BorderStyle.Single;
footer.Format.Borders.Bottom.Space = 0.06F;