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

Free Support Forum - aspose.com

After flattening fields- fields are left blank and an error message appears in Acrobat

When I open the attached file “sample.pdf” using Aspose.PDF, flatten its fields, and then save the document, problems occur.



The code I used for this was:



Dim Document as New Aspose.Pdf.Document(SourceFile)

Dim Form as New Aspose.Pdf.Facades.Form(Document)

Form.FlattenAllFields()

Document.Save(DestFile)





First, two of the fields are left blank - the values in fields 2b (Market Value) and 3 (Consideration) are missing.



Second, when you click on the document after opening it in Acrobat, you get an error message: “An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.”



Is there something I can do to avoid the error message? Is it appearing because of a script that’s in the document that can’t run properly without the fields, maybe? When I use Acrobat’s “Remove Hidden Information” tool, it removes any left over actions or scripts, but the error still happens, so I don’t think that’s the problem.



Can someone take a look and see if there’s some way to get those fields to fill in properly when flattened, and to avoid the error message after opening it in Acrobat?



Thanks,

Michael Whalen

Hi Michael,


Thanks for contacting support.

First, two of the fields are left blank - the values in fields 2b (Market Value) and 3 (Consideration) are missing.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; -webkit-text-stroke: #000000} span.s1 {font-kerning: none}

I have tested the scenario and have managed to reproduce the problem that after applying FlattenAllFields() method two of the fields are left blank. For the sake of correction, I have logged it as PDFNET-42292 in our issue tracking system.


Second, when you click on the document after opening it in Acrobat, you get an error message: "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."


I have tested and have managed to reproduce this issue as well. For the sake of correction, I have logged another ticket as PDFNET-42293 in our issue tracking system.


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; -webkit-text-stroke: #000000} span.s1 {font-kerning: none}

We will further look into the details of these problems and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.


Best Regards,