Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe LiveCycle Designer Check Box Values not being saved when using Automation

Avatar

Level 1

I'm using Automation to populate and save a set of Adobe LiveCycle created forms from a database.

For testing, I have the form visible while populating it and can see the checkbox values being properly set. But when saving the form, everything EXCEPT the checkboxes/radiobuttons settings are being saved with the form.

I can manually open one of the forms and set various checkbox values and save the form, and they retain their settings.

Does anyone know how to get LiveCycle Designer checkbox values to retain their values on Save when using Automation?

3 Replies

Avatar

Level 10

Are you referring to the PDF Automation Server from Qoppa Software?

Avatar

Level 1

Steve,

No, I am using VB.NET, Acrobat ActiveX Automation.  This function accepts a template PDF file and the output PDF file, and populates the Text Box and Checkboxes.  Only the Text Box value is retained in the saved file.  I can send you examples if you like.

    ' -----------------------------------------
    ' Required References for Adobe Automation:
    ' -----------------------------------------
    ' Adobe Acrobat 9.0 Type Library 1.1.0.0
    ' AFormAut 1.0 Type Library 1.0.0.0

    Private Sub PopulateTemplateAndSaveFile(ByVal templateFile As String, ByVal saveFile As String)
        Try
            Dim AcroXApp As Acrobat.CAcroApp
            Dim AcroXAVDoc As Acrobat.CAcroAVDoc
            Dim AcroXPDDoc As Acrobat.CAcroPDDoc
            Dim AcroXFields As AFORMAUTLib.Fields
            Dim AFormApp As AFORMAUTLib.AFormApp

            AcroXApp = New Acrobat.AcroApp
            AcroXAVDoc = New Acrobat.AcroAVDoc
            AcroXPDDoc = New Acrobat.AcroPDDoc

            If AcroXAVDoc.Open(templateFile, "XYZTemplate") Then
                AcroXAVDoc.BringToFront()
                AcroXApp.Hide()

                AcroXPDDoc = AcroXAVDoc.GetPDDoc

                AFormApp = New AFORMAUTLib.AFormApp
                AcroXFields = AFormApp.Fields

                ' Get Fully Qualified Field Names
                'For Each myField As AFORMAUTLib.Field In AcroXFields
                '    MsgBox(myField.Name)
                'Next myField

                AcroXFields.Item("form1[0].#subform[0].txtName[0]").Value = "Gordon Bell"
                AcroXFields.Item("form1[0].#subform[0].chkBox1[0]").Value = "1"
                AcroXFields.Item("form1[0].#subform[0].chkBox2[0]").Value = "0"
                AcroXFields.Item("form1[0].#subform[0].chkBox3[0]").Value = "1"

                AcroXPDDoc.Save(Acrobat.PDSaveFlags.PDSaveFull, saveFile)
                AcroXPDDoc.ClearFlags(&H1)
                AcroXPDDoc.Close()
            End If

            AcroXFields = Nothing
            AFormApp = Nothing

            If AcroXAVDoc IsNot Nothing Then
                AcroXAVDoc.Close(True)
                AcroXAVDoc = Nothing
            End If

            AcroXPDDoc = Nothing

            If AcroXApp IsNot Nothing Then
                AcroXApp.CloseAllDocs()
                AcroXApp.Exit()
                AcroXApp = Nothing
            End If

            MsgBox("Saved.")

        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Exclamation)
        End Try
    End Sub

Avatar

Level 1

So there is no solution to this obvious bug?