Greeting,
I am trying to flatten a PDF designed using LiveCycle designer that is set as a dynamic PDF. Then I go through my form populate logic it works as expected but the FlattenAllFields() method does not flatten the PDF. Also, no error is thrown executing the method.
Form form = new Form(GetTemplateFromDB(), outputStream);
//Populate form from DB
using (Aspose_PoCDataContext context = new Aspose_PoCDataContext())
{
List<AsposePoC.FormFieldValue> list = context.FormFieldValues.ToList();
foreach (AsposePoC.FormFieldValue value in list)
{
form.FillField(value.FormFieldTagname, value.Value);
}
}
form.FlattenAllFields();
form.Save();
Thanks
Hi David,
Please share the input PDF file with us, so we could test the issue at our end. You’ll be updated with the results accordingly.
We’re sorry for the inconvenience and looking forward to help you out.
Regards,
I have attached the file.
Hi David,
I have tested this file with the latest version (5.1.0), but noticed a different problem. Please have a look at the attached PDF file. I tried to fill some of the starting fields in the attached sample PDF file and saved it without flattening. I have noticed that, in the output PDF file, the filled fields are no more editable and some of the fields are missing values.
You mentioned in your previous post that filling worked fine at your end. Could you please share the filled PDF file with us? Also, please share which version of Aspose.Pdf.Kit you’re using at your end. Moreover, please share the .NET Framework version as well. We’ll further investigate this issue and update you accordingly.
We’re sorry for the inconvenience.
Regards,
Attached is a partial filled PDF. Because this is a proof of concept I am not filling in all the fields. Also some fields cannot be filled by the user. The fields on the form being filled by the database are “Name”, “Other Information”, and “Meeting Date”.
The Aspose version is 5.0.0.1
It is being developed in .Net 3.5 with VS 2008.
Thanks
Hi David,
Thank you very much for sharing the form with us. I have logged this issue as PDFKITNET-23034 in our issue tracking system. Our team will investigate it in detail and you’ll be notified via this forum thread once it is resolved.
We’re sorry for the inconvenience.
Regards,
Do you know if this expected functionality or an enhancement? I am not getting an error during the flatten so I am not sure if it is a defect. Is there a change I can make to my PDF to allow this to work? Do you have example code that you could send me?
Hi David,
This is not an expected functionality rather this is an issue. In fact, some times such issues might be caused due to particular contents or structure of the PDF files. As I mentioned in my earlier post, this issue has been logged at our end and our team is investigating it. We’ll enhance the component to cater this particular scenario. Please spare us some time and you’ll be notified via this forum thread once it is resolved.
We’re sorry for the inconvenience and looking forward to help you out.
Regards,
Could you provide an example of a dynamic form that does work with the flattening method and the code? I don’t mind potentially making changes to our forms if it allows us to implement the functionality. I really need a working solution to move forward with our development.
Hi David,
I’m sorry to share with you that we’re unable to advise you something at the moment to resolve this issue. Our team still needs to investigate this issue in detail and identify the cause of the issue. I have asked our development team to share the ETA of this issue and you’ll be updated with the status the earliest possible.
We’re sorry for the inconvenience.
Regards,
Hi David,
Our team has further investigated this issue and I would like to share with you that the fix for this issue will be available at the end of February or early March.
We’re sorry for the inconvenience.
Regards,