Private Sub FillForm() Dim pdfTemplate As String = "c:\Temp\PDF\fw4.pdf" Dim newFile As String = "c:\Temp\PDF\Final_fw4.pdf" Dim pdfReader As New PdfReader(pdfTemplate) Dim pdfStamper As New PdfStamper(pdfReader, New FileStream( _ newFile, FileMode.Create)) Dim pdfFormFields As AcroFields = pdfStamper.AcroFields ' set form pdfFormFields ' The first worksheet and W-4 form pdfFormFields.SetField("f1_01(0)", "John") pdfFormFields.SetField("f1_02(0)", "Smith") pdfStamper.FormFlattening = True ' close the pdf pdfStamper.Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)