cancel
Showing results for 
Search instead for 
Did you mean: 

Reading a saved pdf form and binding the context.

Former Member
0 Kudos

Is it possible to read a saved pdf document and bind its context.

At present we have a scenario where a user needs to fill in an interactive form in an iView and save it (on the server) as pdf and then the HR opens the same PDF from a different iView and approves it which causes 'Submit to SAP' and data is stored in SAP.

I have done coding where the PDF is stored on server. Now I need to read this PDF document and bind to its context and get the data out.

Please help me out, thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

try this code, it has worked for me. I was able to extract the data from PDF and put that into Context after user uploads the form.

byte[] filebytearray = wdContext.currentAdobeFileElement().getFileData();

WDInteractiveFormHelper.transferPDFDataIntoContext(filebytearray, wdContext.nodePDFForm());

AdobeFile is the node that contains the uploaded data and the file name in my case. PDFForm context node should match the data layout (context) of the PDF.

Hope this helps

Thanks,

Kalyan

Former Member
0 Kudos

I think this solves the problem:

public static void transferPDFDataIntoContext(byte[] pdfSource, IWDNode targetNode)