Hi Mark

Thanks for the help, I tried it, but wrapping it in chunk made no
difference. Here is the code I am using and sample output.

Image image = Image.getInstance(imageData);
int percent = (int)(100 * (PageSize.A4.width()-100) / (image.width()));
percent = Math.min(percent, 100);
image.scalePercent(percent, percent);
Document document = (Document) documentObj;
document.add(new Chunk(image,0,0));

Thanks
Anil

-----Original Message-----
From: Mark Hall [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 26 February 2008 8:39 PM
To: Post all your questions about iText here
Cc: Anil Kumar
Subject: Re: [iText-questions] RTF Add Image & Line Break

Hi,

place the Image in a Chunk, that will display the image in-line.

Mark

On 26 Feb 2008, at 06:22, Anil Kumar wrote:

> There is one automatic line-break / CR gets added after image, is  
> there anyway to stop this happening.
>
> I am using this code.
>
> Image image = Image.getInstance(imageData);
> int percent = (int)(100 * (PageSize.A4.width()-100) / image.width());
> mage.scalePercent(percent, percent);
> document.add(image);
>
> Thanks for the help.
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
>
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_____________________
__________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/

Attachment: ImageLineBreak.rtf
Description: MS-Word document

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to