Convert XFA to AcroForm using Aspose.PDF for .NET - Layout and formatting issues in output PDF

Hi, we have get a trial license to evaluate the purchase of Aspose.PDF, our needs are to convert to normal PDF with Acroform some PDF with XFA. With our PDF file sample unfortunately both the conversion (calling document.Form.Type = FormType.Standard) even the simple operation of flatting the PDF (calling document.Flatten() on .NET) produce some layout and formatting changes (for example text moved outside a box), using other tools (iText, the other one that we want to evaluate, for example) this not happens. There is a way to preserve correct PDF formatting when we perform a flatten or AcroForm corversion operation with your SDK? We asking this beacuse our customers can use any PDF with XFA in our software, so we have no control about what kind of PDF file user can upload. Our software, in brief, give to the user the freedom to customize PDF fields and we cannot go beyond Acroform support for now with our editor.

Thanks in advance for your attention.

Best Regards,
Antonino

@BluQ3,

Can you please share source files along with generated result and complete working sample code so that we may further investigate to help you out.

ExampleCodeAndPDF.zip (1.5 MB)

Thanks Mr. Adnan, i have attached the zip file that contains:

  • Example code that i have used
  • The original PDF with XFA that i have to convert (called pe.pdf)
  • The PDF converted to acroform (called pe_acroform.pdf)

The wrong layout part is on page six, for your convenience i have sent you also two PNG’s, first one, called “Correct_result_detail.png” is the detail on page six with correct formatting (screenshot from pe.pdf), second one, called “Wrong_result_with_Aspose_detail.png” is the bad formatting example for the same page (screenshot from pe_acroform.pdf).

Thanks for you help.

Best Regards
Antonino

@BluQ3,

I have worked with source files and sample code shared by you using Aspose.Pdf and unable to observe the issue. Can you please share environment details along with version which you are using on your end. I have also shared my generated result for your kind reference._acroformperesult.pdf (999.8 KB)

@Adnan.Ahmad

I have downloaded the last version of Aspose.PDF (version 20.1.0) last friday from Nuget (the same day i have requested trial license). Anyway the PDF you have generated suffer, on page six, from the same layout formatting error, i have attached a screenshot taken from internal PDF reader in Chrome (same results with Adobe Acrobat Reader DC), as you can see the text inside the red area that I highlighted crosses the line (if you watch original PDF, this not happens).

error_detail.png (91.7 KB)

Regards, Antonino

@BluQ3,

I have observed your issue and like to inform that I have created investigation ticket with ID PDFNET-47550 in our issue tracking system to investigate and resolve this issue as soon possible.

Thank you so much for your support, we will wait for the issue resolution.

Best regards
Antonino

@BluQ3,

You are very welcome.

@Adnan.Ahmad do you have any news about the expected time frame for the issue resolution? I ask this because i see the ticket status still open…

Thank you for the attention
Antonino

@BluQ3,

I like to inform that issue has been added recently in our issue tracking system. I also like to inform that issue are resolved on first come first serve basis in Aspose.PDF. I request for your patience and we will share good news with you soon.