Expand my Community achievements bar.

How to get XML data from a PDF form in .NET?

Avatar

Former Community Member

Hi,

I know this may not be a proper question in this forum, but it is a PDF form related issue. I need some help in solving my problem in the following scenario:

I have a web app processing PDF files. I have PDF fillable forms generated by Lifecycle. User downloads it from my web app, fills out it and sends it back via my web app (upload). I need to parse the form to XML file, then my existing web service will process XML files and save it to database. Previous we used an Email Submit Button and user sent us the XML by email so there was no issue, but now the user just sends us PDF file.

So I am looking for a way to get an XML file from PDF file in .NET (C#), just like Email Submit does. First I need know what is the best way to achieve it. Then I need some sample code for it.

Your help is greatly appreciated.

Thanks

Sam

2 Replies

Avatar

Level 10

You can use the library iTextSharp

http://stackoverflow.com/questions/6287880/pdf-to-xml-conversion-using-net

Best library I've been suggested to work with PDF in C#

Avatar

Former Community Member

It depends on your PDF. Is the PDF a static XFA or a dynamic XFA?

You can check to see if the PDF is static/dynamic by clicking File=>Save As, and it should say static or dynamic PDF as file type.

iText will work with Static XFA forms created in LiveCycle. Dynamic XFA forms are not supported.

You can also submit XML data to a server side script and parse the XML data using C# system.xml.xmlreader.

Another tool that may speed the development of the project is:

http://www.fdftoolkit.net/

Note: FDFToolkit.net utilizes iText Technologies.