Page 57 of the book has some examples but the important thing to
remember is that the returned PdfContentByte can be used with ColumnText
to add tables or other sophisticated layout.

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Anthony Maguire
> Sent: Monday, June 25, 2007 11:49 AM
> To: [email protected]
> Subject: [iText-questions] Add content to an existing PDF document
> 
> Hi,
>  
> I'm new to using iText and while it looks like its the 
> application i need to use, one thing i just can't find 
> anywhere is what is the best way to add content to an 
> existing document. I assume this is a question every newbie 
> asks and i thought the answer would be on the FAQ, but i 
> haven't found it there, or the parts of the mailing list that 
> i've gone through.
>  
> As it stands i'm getting a handle on the PDFStamper and the 
> PDFContentByte object of the document i want to change. After 
> that i'm basically just writing text to designated 
> coordinates, and through trial and error finding out the 
> right coordinates. But it there a better way than this, 
> should i be overlaying a table and writing to the table and 
> it cells. One of the problems i've noticed is that i need 
> some text to be RIGHT justified and to do that, i create a 
> Chunk object with the text, getWidthPoint and write to the 
> point i want to write to minus the result of the 
> getWidthPoint. Problem is here, if i change fonts, then the 
> alignment is off.
>  
> Also i need to write some texts to the document, does 
> wrapping work automatically or do i need to figure out how 
> long each line is and only right out the amount less than the 
> width of the document?
>  
> Sorry if this email is long-winded, and i can only imagine 
> one that has been answered many times before, but i can't 
> find the necessary threads. I have also bought the iText in 
> Action book, but it doesn't say definitely what can and 
> cannot be done. And the document i'm writing to is an 
> AcroForm document.
>  
> Thanks in advance,
> Anthony Maguire
> Oakton
> ph:  (03) 9617 0200
> fax: (03) 9621 1951
> Mobile: 0416 766 931
> www.oakton.com.au 
> <https://melb.oakton.com.au/exchweb/bin/redir.asp?URL=http://w
> ww.oakton.com.au> 
> 
> IMPORTANT
> 1.    This email and any attachments are confidential.  Any 
> unauthorised dissemination or other use of these materials is 
> prohibited.  If received in error, please contact us and 
> delete all copies.  
> 2.    Before opening or using attachments, check them for 
> viruses and defects.  Our liability is limited to resupplying 
> any affected attachments. 
> 3.    Protecting your privacy is important to us.  Our 
> privacy statement and further information is available at 
> www.oakton.com.au.


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.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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