Convert XFA to Dynamic AcroForm using Aspose.PDF for .NET - NullReferenceException Exception

I

I am looking at a tool to convert XFA/PDF documents into “normal/standard” pdf that can be read in all browers.
Your tool looks OK with the trial version, but i need to be sure that it can convert the full PDF document that attach.

Can you do the test and send me the result?
My email is joseluis.lopes@unipartner.com

Thanks in advance

José luis Lopes

Hi José luis Lopes,

Thanks for your interested in our API’s.

I have tested the scenario of XFA form to standard PDF file and as per my observations, the resultant file is properly being generated. For your reference, I have also attached the output generated over my end.

In order to remove limitations of trail version, you may consider requesting a 30 days temporary license by following instructions specified over Get a temporary license

[C#]

Document pdfDocument = new Document(@“C:\pdftest\change+project.pdf”);
pdfDocument.Form.Type = FormType.Standard;
pdfDocument.Save(@“C:\pdftest\change+project_Standard.pdf”);

Hi

The file is not correcly converted.
The field “Fundamentação (Máximo de 4000 caracteres)” is not displayed with the correct number of lines.
This is a huge problem

Hi José luis Lopes,


Thanks for sharing the details.

I have tested the scenario and have managed to reproduce above stated problem. For the sake of correction, I have logged it as PDFNEWNET-41017 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

This problem is avoid us to use your product

We need it urgently!

Can we have a dead line?

is the Issue PDFNEWNET-41017

This problem is avoid us to use your product

We need it urgently!

Can we have a dead line?

Hi José luis Lopes,


Thanks for your patience.

As we recently have noticed earlier reported issue, so its pending for review and is not yet resolved. However the product team will surely consider investigating/fixing it as per development schedule and as soon as we have some definite updates regarding its resolution, we will let you know. Please be patient and spare us little time. We are sorry for this delay and inconvenience.
codewarior:
Hi José luis Lopes,

Thanks for your patience.

As we recently have noticed earlier reported issue, so its pending for review and is not yet resolved. However the product team will surely consider investigating/fixing it as per development schedule and as soon as we have some definite updates regarding its resolution, we will let you know. Please be patient and spare us little time. We are sorry for this delay and inconvenience.


Hello,
i have also an issue changing the form type using the same code as above.

I get a null reference Exception

Stacktrace:

bei ​.( ​ , Int32 )
bei ​.( ​ , Int32 )
bei ​.( , ​ , SizeF )
bei ​.(XmlDocument , XmlDocument , XmlDocument , SizeF , , , Uri , ​ )
bei .(Dictionary`2 , XfaParserOptions , ​ )
bei Aspose.Pdf.Forms.Form.(String , String , String )
bei Aspose.Pdf.Forms.Form.set_Type(FormType value)....
Volker Zinser:
codewarior:
Hi José luis Lopes,

Thanks for your patience.

As we recently have noticed earlier reported issue, so its pending for review and is not yet resolved. However the product team will surely consider investigating/fixing it as per development schedule and as soon as we have some definite updates regarding its resolution, we will let you know. Please be patient and spare us little time. We are sorry for this delay and inconvenience.

Hello,
i have also an issue changing the form type using the same code as above.

I get a null reference Exception

Stacktrace:

bei ​.( ​ , Int32 )
bei ​.( ​ , Int32 )
bei ​.( , ​ , SizeF )
bei ​.(XmlDocument , XmlDocument , XmlDocument , SizeF , , , Uri , ​ )
bei .(Dictionary`2 , XfaParserOptions , ​ )
bei Aspose.Pdf.Forms.Form.(String , String , String )
bei Aspose.Pdf.Forms.Form.set_Type(FormType value)…

Hi José luis Lopes,


Thanks for contacting support.

Are you getting above stated exception while using earlier shared document or its appearing for some other document ? Please note that during my testing with Aspose.Pdf for .NET 11.7.0, I did not notice any exception during form field type conversion.

If its occurring for some other document, please share the resource file, so that we can try replicating the problem in our environment. We are really sorry for this inconvenience.

Thank you for the Quick Reply.

I’ve add a Zip-file with 3 Sample Dokuments.

The Flatten() Funktion seem not working to.

Hi José luis Lopes,


Thanks for sharing the resource files.

I have tested the XFA to Standard form type conversion scenarios and have managed to reproduce following issues.

  • test 08df6e85-13b5-4cda-b17c-4d1ebe24f847.pdf - I did not notice any problem when converting this form to Standard form type. However I have observed many formatting and missing contents issues in resultant file. For the sake of correction, I have logged it as PDFNET-41040 in our issue tracking system.
  • test 63dd0fe8-cbc9-461a-954b-9e71fc80f406.pdf - I have managed to reproduce the NullReferenceException. For the sake of correction, I have logged it as PDFNET-41037 in our issue tracking system.
  • test ccebc5cb-84b9-4d8b-b469-5e3a8be9d9de.pdf - I have managed to reproduce the NullReferenceException. For the sake of correction, I have separately logged it as PDFNET-41038 in our issue tracking system.

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

The Dokument

08df6e85-13b5-4cda-b17c-4d1ebe24f847.pdf

seems to be converted but there are some Issues more:



1. Convert to PDFA does not work

2. Convert to PdfFormat.v_1_5 works but all Values are lost

3. Save as *.doc works but all Values get lost.



It would be nice to have a Timeline or some more Information about the progress of fixing this Issues / Bugs because i have seen some other threads with Problems Converting Forms so this must be a general problem

Volker Zinser:
The Dokument
08df6e85-13b5-4cda-b17c-4d1ebe24f847.pdf
seems to be converted but there are some Issues more:
  1. Convert to PDFA does not work
Hi José luis Lopes,

Thanks for sharing the details.

I have tested the scenario and have managed to reproduce same problem and for the sake of correction, I have logged it as PDFNET-41061 in our issue tracking system.
Volker Zinser:
2. Convert to PdfFormat.v_1_5 works but all Values are lost
I have also managed to reproduce this problem and have separately logged it as PDFNET-41062 in our issue tracking system.

Volker Zinser:
3. Save as *.doc works but all Values get lost.
This issue is logged as PDFNET-41063 in our issue tracking system.

Volker Zinser:
It would be nice to have a Timeline or some more Information about the progress of fixing this Issues / Bugs because i have seen some other threads with Problems Converting Forms so this must be a general problem
As we recently we noticed these problems, so until or unless we have investigated them in details, we may not be able to share the possible time lines regarding their resolution. Also please note that each conversion scenario is dependent upon the structure of input document, so the time taken by API to resolve these issues varies from document to document. Nevertheless, as soon as we have some definite timelines regarding their resolution, we will let you know.

HI

Don’t forget my initial problem, The field was not inceased in size to cope with the many lines that we put on the XFA/PDF document.
Thankas

Hi José luis Lopes,


All issues reported earlier will be resolved as per development schedule and as soon as we have some definite updates regarding their resolution, we will let you know.

I don’t mean to be not impatient but are there any Updates or News for The XFA Problems

HI,


I am also facing the same problem. I tried, but was unable to successfully flatten out the file.

1.
Aspose.Pdf.Document doc = new Document(“C:\InputLiveCyclePDF_2.pdf”);
doc.Flatten();
doc.OptimizeSize = true;
doc.Optimize();
doc.Save(“C:\OutPut-Document.Flatten_2.pdf”);

This code is working if I open the flatten file with Adobe Reader. But If I open the same form in Adobe Pro all the fields are populated and editable

2.
Aspose.Pdf.Facades.Form pdfForm = new Aspose.Pdf.Facades.Form(“C:\InputLiveCyclePDF_2.pdf”, “C:\Outputfile-FlattenAllFields_2.pdf”);
pdfForm.FlattenAllFields();
pdfForm.Save();

This code is working if I open the flatten file with Adobe Pro. But If I open the same form in Adobe adobe reader all the hidden fields are also populated.

3.

Aspose.Pdf.Document doc = new Document(“C:\InputLiveCyclePDF_2.pdf”);
// Set the form fields type as standard AcroForm
doc.Form.Type = FormType.Standard;
doc.Flatten();
doc.OptimizeSize = true;
doc.Optimize();
doc.Save(“C:\ OutPut-Document_Standard.Flatten_2.pdf”);

This code is rendered all the controls irrespective of the radio button selection.

Here with I have attached the sample documents for your reference

Is there any solution to create flatten form that works in both Adobe Reader and Adobe Pro.

We are using Aspose.Pdf_11.7.0

Thank you in Advance

hi, i have testet the issue with 11.8 all bugs are existent in this Version too.

Hi,


Do you have any release deadline for the below tickets?

PDFNEWNET-41017
PDFNET-41037
PDFNET-41038
PDFNET-41040
PDFNET-41084
PDFNET-41085

Regards,
Sridhar

Volker Zinser:
I don’t mean to be not impatient but are there any Updates or News for The XFA Problems
Hi Volker,

Thanks for your patience.

As shared earlier, the issues reported earlier are not yet resolved and they are still pending for review. However as soon as we have some definite updates regarding its resolution, we will let you know.