Save Livecycle PDF file before submitting to server

430 Views Asked by At

I have created a LiveCycle PDF form that includes a Submit button to send it as XDP (including the base64 encoded PDF) to a server that pulls out the XML data and saves that to a database and then pulls out the encoded stream, decodes it and saves that back as a PDF on the server.

The issue that I am having is that once I open the PDFs made from the base64 encoded data, it seems that they are empty. After some testing I found that if I manually save the PDF before Submitting it, the information that was entered up to when it was saved is included in the encoded PDF (whereas the full data is included in the XML portion).

So my question is there a way to either:

  1. Automatically save the PDF or otherwise preserve the data so it is sent in the base64 encoded portion of the XDP? (preferable)

  2. Recognize when a change in the document has changed and request that the user save the PDF before clicking submit?

1

There are 1 best solutions below

0
On

It seems the issue I described above was actually due to using Foxit reader instead of Adobe reader.

Adobe reader of course requires the Reader Extensions in order to be able to save form data and submit it.

Foxit does not have that restriction but does not embed the updated version of the PDF in the XDP XML data sent to the server. The only way to perform this would be ensure the user saves the PDF first which removes the Reader Extensions as per Adobe's licensing requirements.