Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Need to pre-populate and Extract data from static PDF form

Avatar

Former Community Member

Hi Jasmin or Jayan or anyone else that can answer.

I have a requirement to use Digital Signatures.  Because of that, the forms must be static PDFs and the form variables will be “document form”.  I want to pre-populate the form via an SQL query and custom render process and render it as PDF so that the submitter can apply a digital signature when he/she is done and ready to submit for approvalSubsequent approvers will also digitally sign the form.  I know that I will specify the custom render to render only once and thereby preserve the signature(s) on the form.  I do, however, need to extract data from the form to control the business process.  I cannot access the data in the form the same way I do with an xdp and I also cannot pre-populate the same way I do with an xdp. 

Any suggestions on how to attack this?

2 Replies

Avatar

Former Community Member

Hi Eric,

The easiest is to use SetValue operation to assign your document variable content to the variable that holds the xdp. Once you have that then the usual pre-pop will work and once that's all done then use SetValue again to put that content into the document variable.

cheers,

Parth Pandya

blog.pandyaparth.com

Avatar

Level 10

Parth, one problem with your approach is he will submit PDF and therefore you won't be able to put the PDF in a variable that's suppose to contain just xml.

The prepopulation should be the same. If you start off with an xdp, then you will call a render service that merges data with your xdp to create a PDF.

Now when you submit, you will submit the entire PDF back in the Document Form variable. In Workbench, you can use the FormDataIntegration service to extract data from that PDF that's being stored under Document Form var/object/document and put it in an xml variable. Then you can just use xPath to do your condition.

I'm assuming you'll just pass that same Document Form variable to the next step, because if you do any change to the PDF it'll brake the signature.

Let me know if I missed anything.

Jasmin