> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Gupta, Rahul
> Sent: Wednesday, September 20, 2006 4:44 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] populate the existing pdf 
> formfromdatabasevalues
> 
> Hi 
> 
> I m doing in the following way:
> 
>         String key;
>         PdfReader reader = new 
> PdfReader("C:\\src\\EditPdf\\IPC-1752-1_v1.02.pdf");
>         AcroFields form = reader.getAcroFields();
>         HashMap fields = form.getFields();
>         for (Iterator i = fields.keySet().iterator(); i.hasNext(); ) {
>             key = (String) i.next();
>             System.out.println(key);
>         }
> 
> after this I am inserting the values like this:
> 
>  try {
>             PdfStamper stamp = new PdfStamper(reader,  new 
> FileOutputStream("C:\\stamped.pdf"));
>             stamp.getAcroFields();

form = stamp.getAcroFields();

>             //set the field values in the pdf form
>             
> form.setField("MCD[0].RoHSpage1[0].RequestInformation[0].Reque
> stCompanyName[0]", "Rahul Gupta");
>             stamp.setFormFlattening(true);
>             stamp.close();}
>         
>         catch(Exception e) {
>             System.out.println("Error: " + e);
>         }
> 
> But now also its giving me the the same error.
> 
> sorry for such simple question, as I am not so expert in java.
> 
> Thanks
> Rahul
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Behalf Of Paulo
> Soares
> Sent: Wednesday, September 20, 2006 11:17 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] populate the existing pdf form
> fromdatabasevalues
> 
> 
> Use PdfStamper.getAcroFields().
> 
> Paulo 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On 
> > Behalf Of Gupta, Rahul
> > Sent: Wednesday, September 20, 2006 4:14 PM
> > To: Post all your questions about iText here
> > Subject: Re: [iText-questions] populate the existing pdf form 
> > from databasevalues
> > 
> > Hi
> > 
> > Nice to get so early reply. The problem now I m facing 
> > is,when I try to write in one of the acrofield its giving me 
> > following exception :
> > 
> > Error: com.lowagie.text.DocumentException: This AcroFields 
> > instance is read-only.
> > 
> > I even tried to check the properties of existing pdf, but its 
> > not read only and the pdf form has been developed in Adobe 
> > Designer 7.0
> > 
> > Thanks
> > Rahul Gupta
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] 
> > Behalf Of Bruno
> > Lowagie (iText)
> > Sent: Tuesday, September 19, 2006 9:12 AM
> > To: Post all your questions about iText here
> > Subject: Re: [iText-questions] populate the existing pdf form from
> > database values
> > 
> > 
> > Gupta, Rahul wrote:
> > > Hi,
> > > 
> > > I am working on a project in which i have to populate the 
> > existing pdf form from the database. The problem here I am 
> > facing is, how do I know the exact position where I have to 
> > fill the values from the database to the pdf form.
> > 
> > If your PDF document can't give you the coordinates as 
> > explained in the 
> > FAQ: http://itext.ugent.be/library/question.php?id=31
> > Then you are making the wrong assumptions: you don't have a 
> pdf form, 
> > you only have a PDF document.
> > Open the document in Acrobat and add AcroFields to it, then 
> > follow the 
> > instructions of the FAQ.
> > br,
> > Bruno
> > 
> > --------------------------------------------------------------
> > -----------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the 
> > chance to share your
> > opinions on IT & business topics through brief surveys -- and 
> > earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge
> > &CID=DEVDEV
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> > --------------------------------------------------------------
> > -----------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the 
> > chance to share your
> > opinions on IT & business topics through brief surveys -- and 
> > earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge
> > &CID=DEVDEV
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> 
> 
> 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.
> 
> 
> 
> 
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the 
> chance to share your
> opinions on IT & business topics through brief surveys -- and 
> earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


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.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to