I have heard a few of our customers mention that they have SharePoint and LiveCycle ES but there seems to be a knowledge gap in how the two can be used together. Recently, we posted a whitepaper on Devnet. This whitepaper provides an excellent overview of the integration possibilities and added-value touch points. But the bottom line is that samples are what make the IT world turn. So, I decided that I would create a couple of quick samples that would demonstrate some of the low hanging fruit available. The problem is, where to start??? As if it was a sign, I stumbled on an Adobe forums post where someone was trying to submit data from a PDF form to SharePoint.
The key to handle a custom submission in SharePoint is to create a custom handler. Sounds worse than it actually is. It’s actually very simple to get this working. Here is a link to a good MSDN article on how to create custom handlers (ashx) for Sharepoint 3.0:
http://msdn.microsoft.com/en-us/library/bb457204.aspx. From this article, I was able to create a custom handler that accepts an XML post from a PDF form. The handler then parses the submitted XML and extract some key values. Since this is a sample, I took the liberty to hard-code some of the logic to keep things simple :). Using the SPList API, I create a new list entry (A custom list I created in SharePoint called ‘Purchase Order’). Since the list I created had custom columns (Total, date, ordered by), I pump the data extracted from the XML submission into the desired columns. Finally, I attach the submitted XML document to the list entry.
As for the PDF Form, all you have to do is edit the form in Adobe Designer, configure the submit button on your form to submit XML or XDP data, and point the submission to your custom handler (ex: http://mysharepointserver/_layouts/SP_PDFSubmitHandler.ashx).
The screenshot below shows what the result of the submission looks like.
This is a snapshot of the the Custom List:
This is a snapshot of the item detail of a submission