Load Signatures

 

F/PDF, ASP, Self-Sign Signatures and ADO (Load Signatures Subroutine)

 

Sub LOAD_SIGNATURES(byVal Form_ID,byVal Primary_Value)

On Error Resume Next

Dim vntStream3, RS_Apr3, intAppr3

Response.Buffer = true

Create Recordset Variable

Set RS_Apr3 = Server.CreateObject("ADODB.Recordset")

Dim aSQL, strDBPath

 

Set the Database Path

strDBPath = server.MapPath("../Databases/PDFData.mdb")

 

Set the Sql statement

aSQL = "Select * From Signature_Table Where Form_ID Like '" & Form_ID & "' AND Primary_Value LIKE '" & Primary_Value & "';"

 

Open Recordset Object

RS_Apr3.Open aSQL, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";", 3, 3

Dim cPdfFileName

Set PDF Filename

cPdfFileName = Server.MapPath(PDFs/My_PDF.pdf)

 

Dim binObj3

Open Binary Read Buffer Object

Set binObj3 = Server.CreateObject("binReadWriteBuf.BinRead")

 

Set MIME Type to PDF

Response.ContentType = "application/pdf"

 

Load Blank PDF First to Buffer

vntStream3 = binObj3.readBinFile(cPdfFileName)

Response.BinaryWrite vntStream3

Set binObj3 = Nothing

 

if RS_Apr3.RecordCount > 0 then

  RS_Apr3.MoveFirst

  Send each signature to buffer

  For intAppr = 1 to RS_Apr3.RecordCount

     vntStream3 = RS_Apr3("FormObj").GetChunk(LenB(RS_Apr3("FormObj")))

     Response.BinaryWrite vntStream3

     If Not RS_Apr3.EOF Then

        RS_Apr3.MoveNext

     End if

  Next

end if

 

Close RecordSet

RS_Apr3.Close

Set RS_Apr3 = Nothing

err.Clear

Response.End

End Sub

 

 

Home
PDF Programming
ASP Server Setup
ASP Programming
Digital Signatures
FDF Programming
ASP.Net Server Setup
ASP.NET
Problems and Solutions
VB6 Programming
Load Signatures
Save Signatures

 

Copyright 2003, 1991 - 2002