Created: 9/17/2010
Modified: 7/21/2014
Private Sub ImageFieldManipulations()
' INSERTS IMAGE IN IMAGE FIELD ON LIVECYCLE FORMS
Dim cFDFApp As New FDFApp.FDFApp_Class()
Dim cFDFDoc As New FDFApp.FDFDoc_Class()
cFDFDoc = cFDFApp.FDFCreate
' ADD XDP FORM
cFDFDoc.XDPAddForm("subform1", Server.MapPath("test_livecycle-image1.pdf"))
' ADD DUMMY FIELD
cFDFDoc.XDPAddField("FullName", "Test Image Field", "subform1", Global.FDFApp.FDFDoc_Class.FieldType.FldTextual)
' ADD IMAGE FIELD
cFDFDoc.XDP_Add_ImageField("Image1", "subform1", Server.MapPath("Signature_01_Small.jpg"), True)
Response.Clear()
' WRITE XDP DATA TO BUFFER
'Response.ContentType = cFDFApp.MimeXDP
'Response.BinaryWrite(cFDFDoc.FDFSavetoBuf(Global.FDFApp.FDFDoc_Class.FDFType.XDP, True))
' WRITE MERGED XDP/PDF TO BUFFER
Response.ContentType = cFDFApp.MimePDF
Response.BinaryWrite(cFDFDoc.PDFMergeXDP2Buf(Server.MapPath("test_livecycle-image1.pdf"), False, ""))
' WRITE MERGED XDP/PDF TO FILE
'cFDFDoc.PDFMergeXDP2File(Server.MapPath("test_livecycle-image-MERGED.pdf"), Server.MapPath("test_livecycle-image1.pdf"), False, "")
Response.End()
End Sub
Go back to Development, Design & Programming Tutorials section