I want to add caption for my Image and for this purpose I create this method:
public static void AddPhotoCaption(
ref Document doc,
ref DocumentBuilder builder,
Shape shape,
string captionTitle,
CaptionPosition position)
{
builder.MoveTo(shape.ParentParagraph);
builder.InsertParagraph();
builder.InsertField(@"SEQ Figure \* ARABIC", "");
builder.Write(captionTitle);
}
but the caption placed behind the image.also I tried :
builder.MoveTo(shape.NextSibling);
but then System.ArgumentNullException' occurred.
Could you please clarify that you want to add text to some image?
If yes then you can just follow the following answer on stack overflow.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.