11
使用iTextSharp我想對齊圖像,以便它嵌入到段落中。我能做到這一點是這樣的:文字中的圖像對齊?
iTextSharp.text.Image image;
image.Alignment = Image.ALIGN_RIGHT | Image.TEXTWRAP;
document.Add(image);
document.Add(new Paragraph("Large string of text goes here"));
但圖像出來與文本右上方周圍(有點像一個L)
我想要的是幾段文字然後是帶有文字的圖像(有點像C)。有誰知道我會如何做VIA iTextSharp?
編輯:
我也試過
iTextSharp.text.Image image;
image.Alignment = Image.ALIGN_RIGHT | Image.TEXTWRAP | Image.ALIGN_MIDDLE;
document.Add(image);
document.Add(new Paragraph("Large string of text goes here"));
,但它是在頂部的形象和它下面的文本顯示。沒有實際的textwrap。
添加部分文本,然後是圖像,然後是文本的其餘部分。 – Kyle 2009-10-09 22:45:50