I created a form in livecycle es 2 and i am trying to use pdftk to fill out the form but it doesn't work. It says it fills it out successfully but when i try to open the pdf it just gives me an error saying "If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document."
Below is the code i am using to fill out the pdf
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$Clicks = "567";
$Impressions = "43,434";
$Cost = "$45.44";
$fdf = '%FDF-1.2
1 0 obj<</FDF<< /Fields[
<</T(Clicks)/V('.$Clicks.')>>
<</T(Impressions)/V('.$Impressions.')>>
<</T(Cost)/V('.$Cost.')>>
] >> >>
endobj
trailer
<</Root 1 0 R>>
%%EOF';
file_put_contents('fields.fdf', $fdf);
$results = shell_exec("pdftk REPORT.pdf fill_form fields.fdf output FINAL_REPORT.pdf flatten");
After doing some research i found out that pdf forms created in live cycles are created as XFA forms and not acroforms. Not sure what the difference is, but has anyone done something similar and been able to get it to work.
Thank you