It depends on what you put in setSimpleColumn but as the other poster
said the best way is to create the doc in Word and convert it to PDF,
then use Acrobat to place fields. Use PdfStamper to fill and flatten
those fields.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of iText Mailing List Account
> Sent: Monday, April 19, 2004 9:12 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Absolute Positioning of Text
> 
> Here's my situation, I've inherited this project from a 
> previous programmer
> who's since left the company, so I'm stuck cleaning up the 
> mess.  I've got a
> form the client developed in Word, putting in a bunch of _'s 
> to indicate
> where the form data was supposed to go.  The want a web page 
> that a user
> fills out the fields, then the client is delivered a PDF 
> filled in with the
> user's information.   What I've figured out so far is this.  
> I've taken the
> form in Word and converted it to a PDF.  Then in my servlet, 
> I read in said
> PDF...
> 
> PdfReader reader = new PdfReader("extern application.pdf");
> PdfImportedPage page1 = a.getImportedPage(reader, 1);
> PdfContentByte cb = a.getDirectContent();
> cb.addTemplate(page1, 0,0);
> 
> From here, I just want to take the form data and drop it on 
> top of the PDF
> I've read in.  This was where the previous programmer left 
> off.  What I've
> been trying to do is make a grid that I can, by hand, mark off the
> coordinates that the form data should go.
> 
> By doing a loop of..
> 
> cb.setLineWidth(1);
> cb.moveTo(document.left(), i);
> cb.lineTo(document.right(), i);
> cb.stroke();
> 
> and a loop of
> 
> cb.setLineWidth(1);
> cb.moveTo(j, document.top());
> cb.lineTo(j, document.bottom());
> cb.stroke();
> 
> I've got my grid.  From here the original programmer was 
> going to just use
> setSimpleColumn commands to place the text.  But when I go to 
> try that, the
> coordinates from my grid are nowhere close to what they 
> should be.  I know I
> could just figure out the difference and calculate the proper 
> coordinates,
> but I want to make sure my logic in all this is correct to 
> begin with.  I've
> got a sinking suspicion that I'm completely way off base in trying to
> accomplish this.
> 
> 
> Chris
> [EMAIL PROTECTED]
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to