Free Support Forum - aspose.com

Convert XFA to AcroForm using Aspose.PDF for .NET - output file has issues

Originally I’d started discussing this on another thread regarding converting a dynamic XFA form to a standard AcroForm but wanted to break out this question I had separately.

I am comparing the outputs for a particular document with both iText and Aspose.PDF (version 20.11.0.0).

Here is the original document:

original.pdf (248.5 KB)

iText (trial mode) seems to do just fine with this form. It’s a little off of the original, but it is mostly left intact. Here is the iText version:

output.itext.pdf (201.0 KB)

Aspose.PDF seems to not handle this form well, particularly with honoring whitespace and such and the fonts seem off. Here is the output from it:

output.aspose.pdf (834.3 KB)

The 2nd page seems to be the biggest offender. I’m not :100: familiar with this form, but it looks like it’s taking available options and dumping (flattening) those to the document as well? Those options appear only if [x] Denial is checked (which it is not by default). Here is a screenshot of it.

itext.aspose.differences.jpg (736.8 KB)

Even if it were checked, it doesn’t seem to respect the whitespace of the original document.

Any insight as to what could be happening here would be helpful. Here is a snippet of what I’m doing:

var document = new Document("original.pdf");
document.Form.Type = FormType.Standard;

document.Save("original.aspose.pdf");

@leviwilson

We have logged an issue as PDFNET-49056 in our issue tracking system after observing it at our side also. We will surely look into its details and investigate the reasons behind this behavior of the API. We will keep you posted with the status of issue resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

@asad.ali sounds great, thanks!

@asad.ali any updates as to the status of PDFNET-49056? Thanks in advance and have a great Thanksgiving!

@leviwilson

You cannot access the ticket as it is logged in our internal issue management system. However, we will keep you posted about the progress against its resolution within this forum thread.

1 Like