Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Redisplaying XDP data

Avatar

Former Community Member
I have a LiveCycle Designer form that submits to an IIS web server in XDP format. I am able to read the request and store it off in a database.



However, I want users to be able to pull back the actual PDF document they earlier submitted and edit it. So, what do I need to do to redisplay the XDP data as a PDF document in Reader?
4 Replies

Avatar

Former Community Member
Do you have LiveCycle Forms? Or are you using a standalone form submitting to IIS using a submit button? If it is standalone then you will need to include the PDF in the submission of the XDP, otherwise the XDP you receive will consist of only data and you will not be able to return to the PDF.



LC Forms would be able to merge standalone data and the initial template XDP together to produce a single PDF.



If you do have the PDF inside the XDP, You should be able to write the XDP back to the client from IIS using the correct content type. I think it is application/vnd.adobe.xdp+xml

Avatar

Former Community Member
David - thanks for the response. I am using Designer standalone and the PDF is embedded within the XDP in base64-encoded text.



Is it enough to simple set the content type and write the XDP back to the Response, shown below? Note that I want the PDF to open in the user's copy of Adobe Reader (Designer isn't installed on the user's machine).



StreamReader reader = new StreamReader(Request.InputStream);

String xdpData = reader.ReadToEnd();

Response.ContentType = "application/vnd.adobe.xdp+xml";

Response.Write(xdpData);

Avatar

Former Community Member
You won't be able to submit an XDP with an embedded PDF from Reader. The client would need Acrobat, or the you'd have to Reader Extend the PDF.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
If the PDF is embedded inside the XDP you receive back then it should be a simple matter to display this again using the correct content type.



Chris is correct in that you will need to have RE to get the embed option to work in standalone reader to begin with.