Thanks a ton Bruno. Really I was not aware about these details of storage style of PDF and other type of files like Word. Now I will do it same way as you have suggested. Is there free s/w availed to create AcroForm? I wanted to create a AcroForm corresponding to a PDF template (like I sent in attachment in previous mail) and then fill it with values on fly.
Regards Shailesh -----Original Message----- From: Bruno Lowagie [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 1:23 PM To: Shailesh Raj (WT01 - HLS) Cc: [email protected] Subject: Re: [iText-questions] Replacing placeholder value in PDF [EMAIL PROTECTED] wrote: > Dear iTEXT users, > I have one PDF file which has placeholders. I want write one Java > application using iTEXT API which should generate another PDF where > placeholder should be replaced by values given dynamically. > I can't use PdfStamper as PDF is not in form AcroForm. Please see the > PDF attached. > > Here in PDF all the text between <> should be replaced some values > passed to API. > > Please let me know whether this possible or not? Maybe, but I wouldn't do it that way. I have plenty of similar projects, but I use either real placeholders (an AcroForm) or XML as data source. Your solution will work for document formats that don't define a layout (for instance HTML, RTF, Word Doc,...). These formats leave it to the application to 'shape' paragraphs, tables, and so on. With PDF, the layout is uniquely defined in the document. If you change a word, the layout won't be adjusted. Unless you are using Tagged PDF (which you don't). In other words: your design isn't good because you're assuming PDF is a document format similar to Word, RTF, HTML,... That assumption is wrong and as a result your design is wrong. br, Bruno ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
