Free Support Forum - aspose.com

Position Text around an image

Hi,

I like to put an image (gif or jpg) on the PDF document with some text beside (on the left) the image.

What’s the best way to do this ?

I succeeded in putting an Image in the PDF document, but the text is skipping by the height of the image. Now i’m looking for any clue to get text at the left side of the image without the ‘empty space’.

Jerry

Dear Jerry,

Thanks for your consideration.

Position text around image is not supported directly. But there are 2 ways you can choose:

1) Using table. Put the text in a table cell and image in another table cell.

2) Using paragraph margins. Please refer to example in Paragraph in the programmer’s guide.

Thanks for your quick reply to my question.

I tried the paragraph margins, but did’nt succeed with that option (using XML).

But the first option, using tables and cells is working fine.

By the way i’m using XML to and i solved it this way:




Line 1
Line 2
Line 3
Line 4