Hi
I'm trying to place an image in a paragraph. But I seem to not be able to position the image where I would like to
Here is the code:
Code:
Paragraph paragraph = m_document.LastSection.AddParagraph();
FormattedText formattedText = paragraph.AddFormattedText(textstring);
Image image = paragraph.AddImage(imageFileName);
image.Width = "1cm";
image.RelativeVertical = RelativeVertical.Line;
image.Top = ShapePosition.Center;
image.Left = ShapePosition.Left;
That is the result:
Attachment:
File comment: This is what I get
actual.jpg [ 10.87 KiB | Viewed 8397 times ]
Here is what I would like to have:
Attachment:
File comment: The goal
goal.jpg [ 11 KiB | Viewed 8397 times ]
I searched for infos. I tried different variations of the RelativeHorizontal, RelativeVertical, ShapePosition, WrapFormat.Style. But the images are always aligned with the bottom of the text.
What am I not getting? What am I not doing right?
Best regards
Hans