Image alignment in text?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 13:14:26

The Phrase and the Paragraph objects do behave differently. Try changing to:

image.Alignment = 6;
document.Add(image);
document.Add(new Phrase("Large string of text goes here"));

This worked for me in VB. ( I had to change the image alignment to the sum of the integer values for ALIGN_RIGHT and TEXTWRAP to get this to work properly).

ALIGN_RIGHT = 2
TEXTWRAP = 4

Your image was displayed at the top of the page because it was the first thing added to the document, and the text was added after it. You can move the image down by either setting its absolute position, or by adding some of your text to the document, then adding the image, then adding the rest of your text.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!