/
Program.vb
24 lines (20 loc) · 1.01 KB
/
Program.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Imports DevExpress.Pdf
Namespace GetRadioGroupCheckedValues
Friend Class Program
Shared Sub Main(ByVal args As String())
' Load a document with an interactive form.
Dim processor As PdfDocumentProcessor = New PdfDocumentProcessor()
processor.LoadDocument("DocumentToFill.pdf")
' Retrieve the form field facade:
Dim documentFacade As PdfDocumentFacade = processor.DocumentFacade
Dim acroFormFacade As PdfAcroFormFacade = documentFacade.AcroForm
' Specify a checked appearance name for the Female radio button:
Dim genderField As PdfRadioGroupFormFieldFacade = acroFormFacade.GetRadioGroupFormField("Gender")
For Each item As PdfFormFieldItem In genderField.Field.Items
If Equals(item.Value, "Female") Then genderField.Value = item.Value
Next
' Save the modified document.
processor.SaveDocument("..\..\Result.pdf")
End Sub
End Class
End Namespace