Free Support Forum - aspose.com

LiveCycle Forms and FlattenFields and FillField

We have two source pdf’s. These were generated using the LiveCycle ES Forms server. RR201.pdf is a dynamic form while RR202.pdf is a static form. Both are in the attached zip file. We need to flatten all the fields on both forms.

The method FlattenAllFields does not work properly on either form. For RR201.pdf, no fields seem to have been flattened. On the other hand, RR202.pdf seems to have been flattened but the data in the form does not appear in the flattened form. Also, a button that is invisible in the source pdf was rendered visible in the flattened pdf.

Here is the code we used:

Aspose.Pdf.Kit.Form form = new Aspose.Pdf.Kit.Form(@“C:\Temp\AsposeForms\RR202.pdf”, string.Format(@“C:\Temp\AsposeForms\RR202_{0}.pdf”, DateTime.Now.ToString(“hhmm”)));
try
{
form.FlattenAllFields();
form.Save();
}
catch (Exception ex)
{

MessageBox.Show(ex.ToString());
}

The FillField method does not seem to be working on either form. The field name used was retrieved from the property FieldsNames.

Below is the code used:

Aspose.Pdf.Kit.Form form = new Aspose.Pdf.Kit.Form(@“C:\Temp\AsposeForms\RR202.pdf”, string.Format(@“C:\Temp\AsposeForms\RR202_SetValue_{0}.pdf”, DateTime.Now.ToString(“hhmm”)));
try
{
//string fieldName = “topmostSubform[0].Page1[0].subFrm_ref_date_mo_day[0].RC_Date[0].RC_Date[0]”;
string fieldName = “ctrl_seller2_name”;
form.FillField(fieldName, “February 15, 2010”);
form.Save();
}
catch (Exception ex)
{

MessageBox.Show(ex.ToString());
}


We used both version 3.8 and version 4.0.

If this is not a bug, what is the proper way to use the above functions? If it is, is there a fix available?

Thanks,
Chard

Hi Chard,

Thank you very much for considering Aspose.

I have tested and reproduced these issues at my end. These issues have been logged as under:

PDFKITNET-13923 - Unable to flatten all fields
PDFKITNET-13925 - Data lost on flattening all fields
PDFKITNET-13926 - Hidden button is visible on flattening fields
PDFKITNET-13928 - Unable to fill the field

Our team will investigate and resolve these issues. You’ll be updated via this forum thread once the issue are resolved.

We’re sorry for the inconvenience.
Regards,

Hello Shazad.Latif,

I would like to inquire about the timeline, if any, of the resolution of the issues I submitted. Can they be easily resolved?

Thanks,
Chard

Hi Chard,

Our team is still investigating the issues; I’m afraid, I can’t share the ETA at the moment. Please spare us some time so we could get some idea about the time and effort required for these issues. You’ll be updated with the estimate the earliest possible.

We’re sorry for the inconvenience and appreciate your patience.
Regards,