0

In HTML, I can do something like this to make an image float and have the text wrap around it:

<img src="foo.png" style="float: left;" />

Which looks something like this:

Can I do something similar in Migradoc? I tried looking at WrapFormat, but whatever I try I can't get it to work with that.

I create the image shape as follows:

var img = new MigraDoc.DocumentObjectModel.Shapes.Image(strTempFile);
Community
  • 1
  • 1
Codecat
  • 2,213
  • 3
  • 28
  • 39

1 Answers1

0

Using WrapFormat you can place the image anywhere.

I don't know what float does for HTML. The image can be placed anywhere, but the main text will not wrap around it. There will be no problems if you place the image on the margin area or otherwise reserve space for it.

Update: You can use a table with two columns to place image and text side by side. This will look good if image height and text height are similar.
The text will not float around the image. This is not (yet) implemented with MigraDoc.

Using WrapFormat Through you can specify that the text layouter will ignore the image. Setting left or right indent for a paragraph you can also get text and image side by side - still no floating of text around the image. The approach with the table is fail safe so I'd rather use a table.