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

Free Support Forum - aspose.com

PDF with form fields to PDF/A

Hi,

I'm using Aspose.PDF to create a pdf-document with several form fields (texts and checkboxes). PDF is generated from xml-schema. After generation user fills formfields, saves the document and uploads it to DB. Is there some way to convert this doc to PDF/A version even when it has formfields in it? If not, I guess I'm forced to create another xml without formfields for PDF/A use or is there some smarter way? If not how can I extract text and checked values from original PDF so that I can fill the PDF/A version with the values user has added?

Thank you for your aswer

Hi Jape,


Thanks for using our API’s and sorry for the delayed response.

Once you have filled the form fields, you can save the PDF document in PDF/A format. So you can use our API to fill form fields and also convert the file to PDF/A format. For further details, please visit

Hi Nayyer,

and thanks for your answer. I'm not sure if I understood correctly.. I've tried converting the the document but it loses all the formfields and also the texts inside then. I'll explain the process again in detail, add codeblocks and also add test files so you´ll understand my problem better. I've simplified the actual process and files but you can reproduce the problem with these.

First I create a "normal" pdf from xml-schema (attached: AsposeTesting.xml). Code for creating the file:

Aspose.Pdf.Generator.Pdf EPTpdf = new Aspose.Pdf.Generator.Pdf();
EPTpdf.BindXML(mapPath, null);
Stream tmpStream = new MemoryStream();
EPTpdf.Save(tmpStream);

File also attached (AsposeTesting.pdf).

Then user fills the formfields (in browser) and uploads the document back. After this I try to convert the file to PDF/A:

Document pdfDocument = new Document(fileStreamToConvert);
pdfDocument.Convert("log.xml", PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
Stream tmpStream = new MemoryStream();
pdfDocument.Save(tmpStream);

The result is the same pdf but formfields and texts in them are missing. File attached (AsposeTestingPDFA.pdf).

Thanks again.

Hi Jape,


Thanks for sharing the details.

I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this problem
as PDFNEWNET-39448 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.