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

Free Support Forum - aspose.com

Create browser viewable static PDF with flattened XFA forms


Our requirement is to convert PDF files with XFA forms into static PDFs in which the form values are maintained.

The objective is to make our PDF files viewable in browser view instead of getting the error message: "Please wait… 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. "

The expected result should match printing the file using tools such as “Adobe PDF” or “CutePDF”.

We are using the following code:

Aspose.Pdf.Document document = new Aspose.Pdf.Document( “C:\sampleFile.pdf” );
document.Form.Type = Aspose.Pdf.Forms.FormType.Standard;
document.Save( “C:\” + “sampleFile_Flatten.pdf” );

If you see from the output PDF, the file is not good. The text is distorted and is in a different character set and there are only 5 pages instead of 18. On the plus side, the one page that has a form in it appears to have been flattened, and this bad file can at least be viewed in the browser.

Attached are the input file and the output file.

Please advise on how we can accomplish our objective.

Thank you.


Randl Morales

sampleFile_Flatten_AsposeVersion18.12.pdf (6.5 MB)
sampleFile.pdf (6.5 MB)


Thank you for contacting support.

We have been able to reproduce the issue in our environment. A ticket with ID PDFNET-45809 has been logged in our issue management system for further investigation and resolution. We will let you know as soon as some significant updates will be available.

We are sorry for the inconvenience.

Hi Farhan,

Can we get an update here please? This issue is holding us back from purchasing full license.

Thank you.




Thank you for getting back to us.

The issue reported by you has been logged in our issue management system about a week ago. It is currently pending owing to previously logged tickets and will be scheduled on its due turn which may take some months. We appreciate your patience and comprehension in this regard.

However, we also offer Paid Support, where issues are used to be investigated with higher priority. Our customers, who have paid support subscription, report their issue there which are meant to be investigated urgently. In case your reported issue is a blocker, you may please consider subscribing for Paid Support. For further information, please visit Paid Support FAQs.