0 Replies Latest reply on Aug 28, 2008 3:14 PM by InfoCon_Brian

    How-to cfpdfform pre-fill a pdf form

    InfoCon_Brian Level 1
      I am trying to pre-populate a pdf form with xml data.

      I found an example of how-to extract data from a form called "cfpdform-xmldata-read.zip",
      but I want to pre-populate the form with existing data.

      The command I am using is:
      <cfpdfform source="TestForm.pdf" action="populate" xmldata="xmldata.xml" />

      It doesn't work, the pdf is just copied over, without filling the fields.
      The data format should be identical.

      I am running:
      ColdFusion 8.01 Developer's Edition on Linux.

      What am I doing wrong?

      <!--- xmldata.xml --->
      <?xml version="1.0" encoding="UTF-8"?>
      <xfa:datasets xmlns:xfa=" http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data><form1><grantApplication><page1><Projec tTitle>Foo Bar</ProjectTitle><RequestNum>123456789</RequestNum><RequestTitle>MyTitle</RequestTitle>< PIName>My Principal</PIName><Degrees>Foo</Degrees><SSN>1234567</SSN><PositionTitle>Software Engineer</PositionTitle><Department>Computers</Department><Subdivision>Quality</Subdivisi on><Address>Bannerghatta Road</Address><City>Bangalore</City><State>Karnataka</State><ZipCode>560029</ZipCode><Ema il>myemail@mail.com</Email><PhoneNum>918051939616</PhoneNum><FaxNum>91803264522</FaxNum><H umanSubjects>1</HumanSubjects><CompNum>321</CompNum><VertebrateAnimals>2</VertebrateAnimal s><AssuranceNum>123</AssuranceNum><FromPeriod/><ThroughPeriod/><BudgetDirectCosts>200</Bud getDirectCosts><BudgetTotalCosts>300</BudgetTotalCosts><SupportDirectCosts>400</SupportDir ectCosts><SupportTotalCosts>500</SupportTotalCosts><OrgAddress>Downtown</OrgAddress><OrgCi ty>Newton</OrgCity><OrgState>WI</OrgState><OrgZipCode>34561</OrgZipCode><Type>2</Type><Org Code>290</OrgCode><IDNumber>98765</IDNumber><District>CapeTown</District><CurrentPage>1</C urrentPage><PageCount>2</PageCount></page1><page2><Description>This is the description of the project</Description><CurrentPage>2</CurrentPage><PageCount>2</PageCount></page2></grantA pplication></form1></xfa:data></xfa:datasets>