Hello,
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.Flatten();
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.
Regards,
Randl Morales
sampleFile_Flatten_AsposeVersion18.12.pdf (6.5 MB)
sampleFile.pdf (6.5 MB)