Expand my Community achievements bar.

Populate a PDF done with Adobe Livecycle Designer

Avatar

Former Community Member

I have a pdf from an institution and I have been asked to populate it directly with data saved in an excel file. I have found that the pdf was done with adobe livecycle designer and with that program I can see the name of the fields in the form.

The pdf can be found in:

https://sedeelectronica.bde.es/f/websede/content/SPA/Form_TRA_clientes.pdf


I have thought to use a VB macro in the excel file to populate the pdf. I have been searching on Internet but by now, I am only able to read the values of the fields, but I can't change them. I know that the code below doesn't work with XFA Forms, but I have read a lot of documentation and I can't find anything else.

Here is the code:

Set gApp = CreateObject("AcroExch.app")
Set avDoc = CreateObject("AcroExch.AVDoc")
If avDoc.Open(FileNm, "") Then
   Set pdDoc = avDoc.GetPDDoc()
   Set jso = pdDoc.GetJSObject()
jso.Getfield("FrmSolicitudTransferenciaEuros[0].FormContent[0].ordena nte[0].datosOrdenanteExterno[0].ordenante[0]").Value  = "new value"

    pdDoc.Save 1, FileNm
    pdDoc.Close
End If

avDoc.Close (True)

Can anybody write an example explaining how to do that with XFA?

Thank you in advance.

1 Reply

Avatar

Level 8

You might want to instead use an XML schema to map cells in your Excel spreadsheet to fields in your form. Then you would just export the XML data from your spreadsheet and import it into your form to populate the fields.

That should get you started. Refer to Excel and LiveCycle Designer documentation for further details.

Kyle