[EMAIL PROTECTED] wrote: > Hi, > > I am going to populate the xml content value to a textfield. > > Can you please tell me how to do it? > > I am using following code, > > cell = new PdfPCell(new Paragraph("Name#:" ,boldBlack)); > cell.setBorder(PdfPCell.NO_BORDER); > table.addCell(cell); > cell = new PdfPCell(); > cell.setBorder(PdfPCell.NO_BORDER); > cell.setCellEvent(new > FieldPositioningEvents(writer, > inputDoc.getRootElement().getChildText("name"))); > cell.setColspan(1); > table.addCell(cell); > > Is it right?
Have you tried it? Does it give the desired result? First you tell us you have an existing PDF template; and that you want to populate it. We explain that your template needs to be a form. If you have a form, you can easily fill it with setField(key, value). Now your code gives the impression you no longer want to use an existing PDF template, but that you want to create the template and fill it at the same time. This could be a requirement, but... your question sounds like this to us: "I am hungry. This morning I had a sandwich. Tomorrow there will probably be potatoes. Am I eating healthy food at the moment?" Please make your question less absurd. -- This answer is provided by 1T3XT BVBA ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/