Hi,
I am trying to insert page number with background border image manually. Please check the Attachment for more understanding. I am using dll version of 4.8.6.53040
Please reply me as soon as possible.
Thank you very much,
Section section = document.Sections[0];
HeaderFooter header = section.HeadersFooters.Header;
Paragraph headerParagraph = header.AddParagraph();
DocPicture headerPicture
= headerParagraph.AppendPicture(Image.FromFile(@"..\..\001.PNG"));
headerPicture.TextWrappingStyle = TextWrappingStyle.Behind;
headerPicture.HorizontalAlignment = ShapeHorizontalAlignment.Right;
headerPicture.HorizontalOrigin = HorizontalOrigin.Margin;
headerPicture.VerticalAlignment = ShapeVerticalAlignment.Top;
headerPicture.VerticalOrigin = VerticalOrigin.Page;
TextBox textbox = headerParagraph.AppendTextBox(20, 30);
textbox.Format.NoLine=true;
textbox.Format.TextWrappingStyle = TextWrappingStyle.InFrontOfText;
textbox.Format.HorizontalOrigin = HorizontalOrigin.Margin;
textbox.Format.HorizontalPosition = 395;
textbox.Format.VerticalOrigin = VerticalOrigin.Page;
textbox.Format.VerticalPosition = 36;
Paragraph pageNumber = textbox.Body.AddParagraph();
Field field = pageNumber.AppendField("page number", FieldType.FieldPage);
field.CharacterFormat.FontSize = 10;
document.SaveToFile("sample.docx",FileFormat.Docx);
System.Diagnostics.Process.Start("sample.docx");