18.4. Fill-in-forms

If you have a complex, pre-generated PDF with named fields, you can easily populate it with values from your application and present it to the user.
<p:form>
Description
Defines a form template to populate.
Attributes
  • URL — A URL that points to the PDF file to use as a template. If the value contains no protocol (://), the file is read locally.
  • filename — The filename to use for the generated PDF file.
  • exportKey — If set, no redirect will occur when the generated PDF file is placed in a DocumentData object under the specified key in the event context.
<p:field>
Description
Connects a field name to its value.
Attributes
  • name — The name of the field.
  • value — The value of the field.
  • readOnly — Whether the field is read-only. The default is true.
  
<p:form
   xmlns:p="http://jboss.com/products/seam/pdf" 
   URL="http://localhost/Concept/form.pdf"> 
  <p:field name="person.name" value="Me, myself and I"/> 
</p:form>