Is there a way to fill existing form fields from a template PDF file, and save as a 'filled' PDF?
Thanks
'Open a document
oGdPicturePDF.LoadFromFile(Application.StartupPath.TrimEnd("\") & "\" & "demo_new.pdf", True)
ffcount = oGdPicturePDF.GetFormFieldsCount
'Set every text field to date
For i = 0 To ffcount - 1
Select Case CType(oGdPicturePDF.GetFormFieldType(i), PdfFormFieldType)
Case PdfFormFieldType.PdfFormFieldTypeText
oGdPicturePDF.SetFormFieldValue(i, Now.ToString)
End Select
Next
'Lock fields
oGdPicturePDF.FlattenFormFields()
'SAve file
oGdPicturePDF.SaveToFile(Application.StartupPath.TrimEnd("\") & "\" & "demo_out.pdf")
Return to GdPicture PDF Plugin
Users browsing this forum: No registered users and 1 guest