The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

nomb (1) [Avatar] Offline
#1
First of all, I've very new to iText. My work ordered the book for me but it isn't here yet and I need to get something working.

Basically there is a form already in pdf. Right now, people have to handwrite stuff onto the printed version of that form, then fax it to themselves so its in their email, then email it to our customers. I have been using itextsharp to recreate that form, however when I created a list entry the paragraph looks like:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

And we need it to look like:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

What do I have to do in iText to get this same affect?

Also, the best scenario would be me being able to just absulte position the dynamic text onto the already created pdf. I was looking through this forum and keep seeing PDFStamper but I'm really lost. Can I get a little help here please?

Thanks,

nomb
blowagie (284) [Avatar] Offline
#2
Re: Yet another question on existing pdfs or block paragraph...
Let me try to understand what you are saying here.

You have an existing PDF with fields at specific positions.
You have some data in a database.
Now you want to add this data to the existing PDF at the specific positions.

Have you tried working with PdfReader, PdfStamper and ColumnText?
Using the specific coordinates, you create a ColumnText object.
You add the content to the ColumnText object using the desired alignment values.

That shouldn't be a problem.