How can I fill PDF form in VB.NET or C#?


How do I fill PDF form using PDFNet SDK in VB.NET?
I am looking for someting very simple to use.

You can use PDFNet SDK to programmatically fill-in PDF forms as
illustrated in
InteractiveForms (
samplecode.html#InteractiveForms) and FDF (
samplecode.html#FDF) sample projects. The following example sets the
new value for "MemberName":

Imports System
Imports pdftron
Imports pdftron.Common
Imports pdftron.SDF
Imports pdftron.PDF

Module Module1

    Sub SetFieldValue(ByRef d As PDFDoc, ByVal name As String, ByVal
value As String)
        Dim itr As FieldIterator = d.FieldFind(name)
        If Not itr.Equals(d.FieldEnd()) Then
            Dim field As Field = itr.Current()
            ' Console.WriteLine("Field search for {0} was
successful.", field.GetName())
            field.SetValue(Obj.CreateString(value)) ' Set the value
            ' Console.WriteLine("'{0}' not found.", value)
        End If
    End Sub

    Sub Main()


            Dim doc4 As PDFDoc = New PDFDoc("Test.pdf")

            SetFieldValue(doc4, "MemberName", "My Name")

            doc4.Save("Test2.pdf", 0)

        Catch ex As PDFNetException
        Catch ex As Exception
        End Try


    End Sub
End Module

You can set the field value in C# along the same lines. For example:

FieldIterator itr = pdfdoc.FieldFind("name");
if (itr != pdfdoc.FieldEnd()) {
  Field field = itr.Current();
  field.SetValue(Obj.CreateString("John Doe"));