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

Free Support Forum - aspose.com

Stream XFA

Hi,

This is a question regarding XFA document to static pdf document.

I have XFA document structured like this. It is designed to insert data and base encoded pdf.

<xdp:xdp xmlns:xdp=‘http://ns.adobe.com/xdp/’>    <xfa:datasets xmlns:xfa=‘http://www.xfa.org/schema/xfa-data/1.0/’>        xfa:data

My Data

        </xfa:data>    </xfa:datasets>    <pdf xmlns=“http://ns.adobe.com/xdp/pdf/”>
       

Base64 encoded PDF.

            </xdp:xdp>

How can use this to convert it to a static pdf document.
I tried the following approach. Please correct me if this approach is not correct .
Convert the above string to a stream and used Form().FlattenAllFields();
Constructor error : Invalid pdf format:pdf head signature is not found!: v4.3.0.0

Form form = new Form(inputstream,outputstream);
string formData = GetFormData();//custom method that returns the above string
byte[] byteArray = Encoding.ASCII.GetBytes(
formData );
var inputStream = new MemoryStream(byteArray);
MemoryStream outputStream = new MemoryStream();
var forms = new Form(inputstream, outputStream);
forms.FlattenAllFields();
forms.Save();

Hi Avinash,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the details.

As per my understanding, you are trying to convert you XFA form to a static PDF form. I am not sure whether this is possible with Aspose.Pdf for .NET at the moment. However, I have asked the development team to confirm if this feature is currently available or not. I have created an issue for investigation in our issue tracking system with issue id: PDFNEWNET-34090. We will notify you via this forum thread regarding any updates.

Sorry for the inconvenience,

Hi Nausherwan,

Did you get reply from your dev team.
Is it confirmed that this feature is not supported in the currentversion ?

I saw sample code that accepts a xfa file and convert it to static pdf . I wanted to check if the same class can take the above mentioned xml as input.

Regards,
Avinash.

Hi Avinash,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I am afraid; I have not received a response from the development team at the moment regarding your requirement. However, I have sent a reminder to the development team to share the details soon. I will update you as soon as I get a feedback from them.

Sorry for the inconvenience,

The issues you have found earlier (filed as PDFNEWNET-34090) have been fixed in Aspose.Pdf for .NET 9.3.0.

Blog post for this release can be viewed over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.