app.openDoc Returns Null When Populating Fields of TargetPDF with Data from Current PDF | Community
Skip to main content
August 28, 2024
Question

app.openDoc Returns Null When Populating Fields of TargetPDF with Data from Current PDF

  • August 28, 2024
  • 1 reply
  • 515 views

I have two LiveCycle forms that have similar data. I'm trying to populate some of the fields on the targetPDF with the data from the source PDF. Unfortunately, app.openDoc always returns a null or undefined value so I'm unable to reference the opened PDF as an object in order to populate it with data from the source PDF. I know one restriction is due to the document-level script need this.disclosed = true, but I believe this only applies to AcroForms. Is there a way to make app.openDoc return a value? Is there a better way to populate the targetPDF? I also tried adding a delay to see if that resolve the issue by ensuring the document was fully opened before checking its state.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adobe Employee
January 15, 2025

Hi @antsmith2988 ,

 

I have couple of questions:

  • Is PDF a static interactive or dynamic?
  • Are you able to extract data from source PDF?

 

If the pdf is interactive or dynamic in nature and you have data from source pdf, then there is one approach to merge this data in target pdf as mentioned below:

You can use the generatePDFoutput API [0] to merge data to target pdf.

 

Please let me know if this resolves the scenario mentioned.

 

[0] OutputService (AEM Forms API)

 

Thanks