Hello,
It's possible to insert a legend under the image ?
Thank you for advance.
//Create a new document and add a section
Document document = new Document();
Section s = document.AddSection();
//Add image and caption
Image img1 = Image.FromFile(@"imagepath1");
DocPicture pic1 = s.AddParagraph().AppendPicture(img1);
CaptionNumberingFormat format = CaptionNumberingFormat.Number;
pic1.AddCaption("This is picture ", format, CaptionPosition.AfterImage);
Image img2 = Image.FromFile(@"imagepath2");
DocPicture pic2 = s.AddParagraph().AppendPicture(img2);
pic2.AddCaption("This is picture ", format, CaptionPosition.AfterImage);
//Update the field.
document.IsUpdateFields = true;
//Save the document to a Word file.
document.SaveToFile("caption.docx", FileFormat.Docx);