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

Free Support Forum - aspose.com

Convert XFA to Dynamic AcroForm and Generate XPS using Aspose.PDF for .NET - Different error occurs in output

Our customer sent us the attached TA13.pdf which contains an XFA form. When we used aspose to convert the pdf to xps, the generated xps contained this text:

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.

Google revealed some aspose articles saying that to avoid this message, change the FormType, like this:

doc.Form.Type = Aspose.Pdf.Forms.FormType.Standard

I did this, and the XPS (attached as o1.xps) no longer contained the warning message, and instead its content looked very similar to the original pdf - but there are still some issues:

[1] If you open the pdf in Adobe Reader, the form has four coloured buttons at the top of p1. When you print the pdf from Adobe Reader these buttons do not appear. However, the aspose-generated xps does contain the buttons. Is this a bug or is there some flag I can set to stop them from appearing in the aspose xps?

[2] The round-cornered boxes (like the address box) in the aspose-generated xps clash with the text.

[3] the text (2nd edition) is vertically placed too high in the aspose-generated xps content.

[4] The Vacant possession paragraph header (and all the other paragraph headers in the document) rendered in xps with a thick black border - but there is no border in the source pdf. Also the [1] bullet is white on a blue background in the pdf, but appears as black on a blue background in the xps.

[5] the checkboxes look different - in pdf they have no border and have radiused corners. In xps they have black border and right-angled corners.

[6] The corner caps on paragraph header 5 are very peculiar.

Although the customer will be pleased that they get XPS content instead of a warning message, they will expect the appearance of the XPS to be the same as if created by adobe reader.

Hi, I have also Problems with Forms and XFA Converting reported in this Thread: Convert XFA to Dynamic AcroForm using Aspose.PDF for .NET - NullReferenceException Exception

Hi Brian,


Thanks for using our API’s.

I have tested the scenario and have managed to reproduce above stated formatting issues. Please note that issues are occurring when converting XFA to Standard Acroform. For the sake of correction, I have logged it as PDFNET-41059 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.
Volker Zinser:
Hi, I have also Problems with Forms and XFA Converting reported in this Thread: https://forum.aspose.com/t/19227
Hi Brian,

The findings related to above stated query are shared in respective forum thread.

Hi Nayyer / codewarior

Thank you for the rapid response.

Are you able to tell me whether issue [1], (the generated xps still contains the four buttons at the top of p1), is a bug within aspose or is it something I can deal with by modifying some property of the pdf document?

I did a little more investigation of issue [1] here. Within VisualStudio debugger, I opened the supplied pdf file inside Aspose.Pdf.Document, and went to its member doc.Form.XFA.XDP.InnerXml and saw this xml:

    

The four buttons on p1 are defined in a subform named buttons and it looks as though this snippet makes them hidden. But I don't know how to get aspose to run the snippet to do this. Can you suggest how?

Hi Brian,


Thanks for your feedback. The issue is related to the conversion of dynamic form to standard form, as conversion is removing the Javascript of the buttons used to hide them during printing. Our product team will investigate this issue as well during analysis of above logged ticket. We will keep you updated about the issue resolution progress.

We are sorry for the inconvenience caused.

Best Regards,

Thanks for the update Tilal.

tilal.ahmad:
Hi Brian,

Thanks for your feedback. The issue is related to the conversion of dynamic form to standard form, as conversion is removing the Javascript of the buttons used to hide them during printing. Our product team will investigate this issue as well during analysis of above logged ticket. We will keep you updated about the issue resolution progress.

We are sorry for the inconvenience caused.

Best Regards,

any Updates or results on your Investigation?

Hi Brian,


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.

Hi, I have been patiently waiting as suggested.

Do you have an update please?

Thanks

@Brian_THOMAS,

Thanks for your patience.

I am afraid the earlier reported issue is not yet resolved as the team has been busy fixing other previously reported issues. However, the product team will surely consider fixing them as per their development schedule and as soon as we have some definite updates regarding its resolution, we will let you know. We are sorry for this delay and inconvenience.

What has become of the pdf that I attached to this case when I originally posted it?

@Brian_THOMAS,

Thanks for your patience.

Do you mean the original TA13.pdf shared earlier when this issue was initially reported ? Please note that it is associated with respective issue in JIRA. Do you need its copy or wanted to have some information regarding it.

Please share the details, so that we can reply accordingly.

I am reassured that you have a copy of the file in your JIRA system, so you will be able to test any code changes against the originally-reported file.

@Brian_THOMAS,

Thanks for the acknowledgement.

The issue will be tested against the file shared earlier and as soon as we have some further updates, we will let you know.

Hi
Do you have an update on this for me please?

Thanks

@Brian_THOMAS,

The linked ticket ID PDFNET-41059 is not resolved yet. We have logged an ETA request under the same ticket ID PDFNET-41059. We will let you know once a significant progress has been made in this regard.

How’s the investigation going for this defect, first reported in June 2016?

@Brian_THOMAS

We investigated the issue and found the it required more time to get fixed. Due to other high priority issues, it could not be resolved. However, we will continue our investigations and will surely inform you as soon as it is resolved. Please spare us some time.

We are sorry for the inconvenience.