<% Option Explicit %> <% Dim confirmation confirmation = request("confirmation") SQL = "select * from chicago2009 where confirmation='" & confirmation & "'" %> <% Dim fullname, contact_hours fullname=orecordset("first_name") & " " & orecordset("last_name") contact_hours=orecordset("hours") Dim FileName FileName = Server.MapPath("certificate.htm") Dim oFileSystemObject, oTextFile, PDFBody set oFileSystemObject=Server.CreateObject("Scripting.FileSystemObject") Set oTextFile = oFileSystemObject.OpenTextFile(FileName,1,false,0) PDFBody = oTextFile.ReadAll PDFBody = Replace(PDFBody,"##fullname##",fullname) PDFBody = Replace(PDFBody,"##contact_hours##",FormatNumber(contact_hours,2)) dim oEasyPDF set oEasyPDF = server.createobject("aspPDF.EasyPDF") oEasyPDF.License("EasyPDF.lic") oEasyPDF.Page "Letter",1 oEasyPDF.SetMargins 20,20,20,20 oEasyPDF.AddHtml PDFBody Response.ContentType = "application/pdf" oEasyPDF.BinaryWrite set oEasyPDF = nothing %>