Adding image with layout - in front of text


#1

Hello.

How can I add an image to a document with a layout of 'In Front of Text'?

I want the picture to be at the upper-left corner and the a text will appear in the upper-right at the same position without the image overridden the text.

Thanks.


#2

You should use DocumentBuilder.InsertImage Method (String, RelativeHorizontalPosition, Double, RelativeVerticalPosition, Double, Double, Double, WrapType, WrapSide, Boolean, PictureFormat) method overload.

For example,

builder.InsertImage(imageFileName, RelativeHorizontalPosition.Page, 10, RelativeVerticalPosition.Page, 10, 100, 100, WrapType.None, WrapSide.Both, false, null);

Here false means that the image should be in front of text. The WrapType should be set to WrapType.None for this to have effect.