Hi,
I am using the following code to add an image to a report:
IWPicture image = paragraph.AppendPicture(imageInfo.Source);
paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center;
if (imageInfo.Text is not null)
{
var caption = image.AddCaption("Image" + " - Figure:", CaptionNumberingFormat.Number, CaptionPosition.AfterImage);
caption.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center;
caption.ParagraphFormat.BeforeSpacing = 1.5f;
}
but it is adding text rather than the desired image number.
Please see the attached report for an example of the output caption on the image.
Attachment:
Image_Caption_f22927f6.zip