We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Field values lost afte flatten pdf

Aspose.Pdf v. 10.1.0.0


Field values sometimes “disappear” after a pdf is flattened.
Don’t know if the values are lost (doubt it), or some sort of sizing/layering issue (most likely), but the end result is the same - nothing on the page where the field were.

Code used:
using (var pdfForm = new Aspose.Pdf.Facades.Form(source))
{
pdfForm.FlattenAllFields();
pdfForm.Save(destination);
}

Hi Ivan,


Thanks for contacting support.

Can you please share your source/input PDF files which you are using so that we can test the scenario in our environment. We are sorry for this inconvenience.
Hi Nayyer,

Please find "before" and "after" files are attached. Look at the cover/first page.

My system works with pdf files coming from different sources (and versions).
Sometimes the aspose flattened results "loses" fields sometimes it doesn't. I'm guessing is a rendering issue, rather than really losing the values, but when it happens, the end result for me is the same.

Thanks.

Hi Ivan,


Thanks for sharing the resource file.

I have tested the scenario using Aspose.Pdf for .NET 11.1.0 and I am unable to notice any issue. For your reference, I have also attached the output generated over my end.

[C#]

using (var pdfForm = new Aspose.Pdf.Facades.Form(“c:/pdftest/before-flatten.pdf”))<o:p></o:p>

{

pdfForm.FlattenAllFields();

pdfForm.Save("c:/pdftest/Flattened_Result.pdf");

}

I downloaded the latest release (11.2).
The couple of cases I used for testing the failure now pass. That’s good news. Thanks.

On the other hand - with the previous version it didn’t fail all the time either - sometimes it would, sometimes, it won’t.
Do you know if the issue was specifically addressed in some release after 10.x or appears to be resolved as a byproduct of other work?

Hi Ivan,


Thanks for sharing the feedback.

Currently I may not be able to share the specific API release in which a particular problem related to form field flatten has been fixed, but it appears that fixes in recent release versions have resolved this problem. We encourage you to continue using latest release and in the event of any further query, please feel free to contact.