0 Replies Latest reply on Apr 28, 2010 7:47 AM by Fausto Morenzoni

    Using iText to fill out forms

    Fausto Morenzoni Newbie

      Hello Everyone,

      I would like to fill out a form using iText.

      The form is created with Adobe Acrobat 8.0 and must have 'user rights', which mean that it has to be eventually modified and saved by the user.

      I've tried to fill out the pdf form example delivered with Seam 2.2 and all works fine. I've created a simple form with a text field and at the moment that the form is loaded I get this error:

      java.lang.UnsupportedOperationException: Partial form flattening is not supported with XFA forms.
           at com.lowagie.text.pdf.PdfStamperImp.partialFormFlattening(Unknown Source)
           at com.lowagie.text.pdf.PdfStamper.partialFormFlattening(Unknown Source)
           at org.jboss.seam.pdf.ui.UIField.encodeBegin(UIField.java:64)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      So my question is: must the form have a particular format? I mean, should I pay attention about version compatibility or something else?

      This is my configuration:

      1. JBoss AS 5.1 (jdk 1.6 compiled version)

      2. Seam 2.2

      3. iText 2.1.7 library

      4. Adobe Acrobat/LifeCycle Designer 8

      Thank you in advance to everyone that can give me some suggestions.