It's easier with a PdfPTable.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Bruno Lowagie
> Sent: Wednesday, September 20, 2006 4:47 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] centering of text
> 
> Dan Adams wrote:
> > Okay, so I'm trying to produce a PDF of a greeting card that will be
> > sent to a printer. What I have is the dimensions of the 
> card, what text
> > to put on the card, and then the exact coordinates of the 
> area on the
> > card in which to put the text. So I need to create an area 
> on the pdf at
> > the exact position specified and then take the text and center it
> > horizontally and vertically within that area. Anyone have any
> > suggestions on the best way to do this and how to get 
> started? Thanks.
> 
> Put the text inside a ColumnText object.
> Then define the area and pretend to add the object (simulate = true).
> The ColumnText will give you info on the current Y position.
> Create the ColumnText anew,
> but use the Y position retrieved earlier to know what offset to use.
> Then add the ColumnText for real (simulate = false)
> br,
> Bruno
> 
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the 
> chance to share your
> opinions on IT & business topics through brief surveys -- and 
> earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to