We’ve been using creation of pdf’s using the BindXml method for several years now.
Now we need to add form fields to a PDF, and are trying to send something like this, inside a table cell:
< FormField FormFieldType=“Text” FieldName=“formFieldTest”>
But when we then open the saved pdf file and try to access the Form list fields, it is empty.
Could you please advise on what we are missing? Is there some additional setting on the xml?
We are using an old version of the API, 11.9 (also tried with some newer versions 17.4 - same result), because we have a lot of legacy XSLT’s which generate the old XML format, so updating to new XML format is not something that might be to hard to do right now.
PDF was generated using the old Aspose.Pdf.Generator.Pdf.BindXML. We’ve tried to update the dll’s to a later version, and start using the Aspose.Pdf.Document.BindXml, but with this Xml the Pdf turns out corrupt. And I was unable to find documentation on the changes needed to the XML so that it becomes supported in this new method.
It is quite an older version of the API and all approaches it was using has been discontinued. We are afraid that we cannot apply any fix or provide documentation related to it. It is quite hard to track such an old logs of the API because they were simply discontinued and we decided to keep providing support on the basis of the latest available version of the API.
Nevertheless, we have logged an investigation ticket as PDFNET-54639 in our issue tracking system to analyze your request further and we will try to come up with some workaround (if possible). Otherwise, we are afraid that you will have to update your XML and XSLT as per the latest and new XML schema. We will let you know once the logged ticket is resolved. Please be patient and spare us some time.
Now. If we wanted to the latest version, and update the XML to the latest structure XML Schema, how would we use the FormFields on it? https://docs.aspose.com/pdf/net/supported-xml-schema/ doesn’t have anything related to form fields, and I couldn’t find any sample with this.
Or is any documentation available on this structure migration?
Because if migration is doable, we would consider trying to do the upgrade, maybe sooner than expected. But we would need to make sure this can be done through XML. By this I mean use form fields and then read them on the API.
We definitely understand your concerns and we do agree with you. The purpose of opening an investigation ticket is that we either investigate a possibility to provide you a solution in existing version that you are using or we incorporate and make it available in the latest version of the API that is using new XML Schema. As soon as we have some results against our investigation, we will let you know in this forum thread.
We have opted for a mixed solution, and have it working.
We are using an XLST to generate a PDF with string like tokens, which we then replace using a TextFragmentAbsorber with the form field in the right location. It is not perfect, but it is working.