> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of uma.k
> Sent: Friday, December 17, 2004 11:09 AM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Alignment problem
> 
> Hi,
> I would like to add some text right aligned in the paragraph. 
> Basically this
> paragraph has only one line and I want it to be on the right 
> side. This is
> my code, Can someone correct me please?
>

It should work. Are you doing document.add(p)?
 
> Also I would like to add an image to my paragraph and right 
> align it and
> this image is coming from different URL, how do I specify the 
> URL to get the
> image.
>

com.lowagie.text.Image.getInstance(url)
 
>       com.lowagie.text.Paragraph p = new com.lowagie.text.Paragraph();
>       //javax.swing.ImageIcon ii = new 
> javax.swing.ImageIcon("copy.gif");
>       //com.lowagie.text.Image i =
> com.lowagie.text.Image.getInstance(ii.getImage(),null);
>       //p.add(i);
>       //p.setAlignment(com.lowagie.text.Element.ALIGN_RIGHT);
>       p.setAlignment("right");
>       p.add(new Chunk("some text"));
> 
> 
> Regards,
> Uma
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from 
> real users.
> Discover which products truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to