I want to add an image in the header section of the first page in an already existing docx file. I am following the example syncfusion has in the "Working with Pages" section, though it is about creating a docs from scratch.I am getting the first section of the docx document, creating paragraphs, creating a byte array from an image, creating picture object from this image, and then appending the picture to the paragraph. My code is like that:
WordDocument document = new WordDocument(filePathFull);
IWSection section = document.Sections[0];
section.PageSetup.DifferentFirstPage = true;
IWParagraph paragraphQRCode = section.HeadersFooters.FirstPageHeader.AddParagraph();
paragraphQRCode.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Right;
// creating byte array from image
//
var picture = paragraphQRCode.AppendPicture(byteArrayImage);
picture.Width = 75;
picture.Height = 75;
document.Save("path", FormatType.DOCX);
But no image showing in the docx header? What am I missing?