Eric,

Adobe has an FDF toolkit for this.  I wrote an answer to this earlier this
week but here it is again:

You have to add it to the classpath.  They have a couple of examples on
their web site.

The command to set a value is:
doc.SetValue("A157","NEW BRUNSWICK",false);

The "A157" is a named field.
"New Brunswick" is the value.
false is a flag.

// define
import com.adobe.fdf.*;


// initialize
    private FDFTK THE_FDFTK;


         public void init(ServletConfig config) throws ServletException{
            super.init(config);

       THE_FDFTK = new FDFTK();
       THE_FDFTK.FDFTKInit();




then you do something like this:

   public void toPost (HttpServletRequest req, HttpServletResponse res)
        throws ServletException, IOException {
        try {
        FDFDoc doc = new FDFDoc();
        doc.SetFile("http://localhost/SF86Form.pdf";);
        doc.SetValue("A157","NEW BRUNSWICK",false);


        } catch (FDFException e) {
          /*PrintWriter toClient = res.getWriter();
     toClient.println("Caught FDF exception");
          toClient.println(e.toString());
          toClient.close();
          */
        }

Good luck!

Ken Rowe

-----Original Message-----
From: eric willialms (mmi) [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 4:06 PM
To: [EMAIL PROTECTED]%internet
Subject: Writing from a servlet to a PDF form field


Hello,
I am doing research right now on how to write from a servlet to and =
Adobe Acrobat PDF document. And I would appreciate directions as to how =
best to handle this question.

Thanks,
Eric Williams

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to