Aspose Demos > Java Components > Aspose.Pdf.Kit for Java > Java > Fill PDF Form Fields

Fill PDF Form Fields - Aspose.Pdf.Kit

This demo show how to Fill form Fields uisng Aspose.Pdf.Kit API. Using FillField , FillImageField , FillBarcodeField method in Form class of Aspose.Pdf.Kit component, developers can fill in form fields programmatically over Pdf document.

For more related information, please visit How to Fill Form Fields With API?


Click Execute Demo to see how demo takes input PDF document and fills form fields, writing resulting PDF document .

XHTML

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      >

<ui:composition template="/WEB-INF/includes/templates/page-template.xhtml">
                        
    <ui:define name="pageTitle">
        Fill PDF Fields - Aspose.PDF Demos
    </ui:define>

    <ui:define name="page-content">
        <ui:decorate template="/WEB-INF/includes/templates/tabbed_container.xhtml">
            <ui:define name="example">

    

<table width="90%" align="center" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td width="19"><img src="../../../../Common/images/heading_lft.jpg" alt="" width="19" height="41" /></td>
    <td width="100%" class="demos-heading-bg"><h2 class="demos-heading-bg"> &nbsp;Fill PDF Form Fields - Aspose.Pdf.Kit</h2></td>
    <td width="19"><img src="../../../../Common/images/heading_rt.jpg" alt="" width="19" height="41" /></td>
  </tr>
</table>

<p class="componentDescriptionTxt">
 This demo show how to <b> Fill form Fields</b> uisng Aspose.Pdf.Kit API.

 Using <b> FillField </b>,<b> FillImageField </b><b> FillBarcodeField </b> method in <a href="http://www.aspose.com/documentation/java-components/aspose.pdf.kit-for-java/com/aspose/pdf/kit/form.html"> Form </a> class of Aspose.Pdf.Kit component, developers can fill in form fields programmatically over Pdf document. 

<br/><br/>
For more related information, please visit <a href="http://www.aspose.com/documentation/java-components/aspose.pdf.kit-for-java/how-to-fill-form-fields-with-api.html"> How to Fill Form Fields With API? </a>

       <br/><br/><br/> Click <b> Execute Demo </b> to see how demo takes <a href="../resources/student.pdf"> input PDF document </a> 
        and fills form fields, writing <a href="../resources/studentOut.pdf"> resulting PDF document </a>.
        </p>

            <h:commandButton id="generate" 
                action="#{mycontext.generate}"
                actionListener="#{mycontext.action}"
                value="Execute Demo"> 
                <f:attribute name="demo" value="fillfields" />
            </h:commandButton>

            <ice:outputResource id="outputResource"
                mimeType="application/pdf"
                resource="#{mycontext.generatedfile}"
                fileName="#{mycontext.filename}"
                shared="false" />

            </ui:define>
        </ui:decorate>
    <br/><br/><br/><br/><br/><br/></ui:define>
</ui:composition>
</html>