P
Paul Eaton
Hi
I am developing my first asp appication (vbscript). I am storing
cheques scans (in pdf format) in the file system along with the db on
the server.
The following code is working without problem except that:-
I want to display the scan/pdf in a new window and keep the current
window at the current position within the application.
Thanks in advance if you can spare the time to show me the best way to
do this.
Paul
(peaton at franklin templeton d.o.t com (with no _))
<%@ Language="VBScript" %>
<% Option Explicit %>
<% response.buffer = true %>
<%
'On Error Resume Next
Const adTypeBinary = 1
Dim strFilePath
Dim RecID
Dim ImagePath
Dim strSecLevel
Dim strSecSubLevel
Dim objStream
ImagePath="e:\IncomingChequesScans\"
strSecLevel=session("seclevel")
strSecSubLevel=session("secsublevel")
RecID=Request.QueryString("id")
'Set the content type to the specific type that you are sending.
Response.ContentType = "seclevel/pdf"
strFilePath = ImagePath & RecID & ".pdf" 'This is the path to the file
on disk.
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePath
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
%>
I am developing my first asp appication (vbscript). I am storing
cheques scans (in pdf format) in the file system along with the db on
the server.
The following code is working without problem except that:-
I want to display the scan/pdf in a new window and keep the current
window at the current position within the application.
Thanks in advance if you can spare the time to show me the best way to
do this.
Paul
(peaton at franklin templeton d.o.t com (with no _))
<%@ Language="VBScript" %>
<% Option Explicit %>
<% response.buffer = true %>
<%
'On Error Resume Next
Const adTypeBinary = 1
Dim strFilePath
Dim RecID
Dim ImagePath
Dim strSecLevel
Dim strSecSubLevel
Dim objStream
ImagePath="e:\IncomingChequesScans\"
strSecLevel=session("seclevel")
strSecSubLevel=session("secsublevel")
RecID=Request.QueryString("id")
'Set the content type to the specific type that you are sending.
Response.ContentType = "seclevel/pdf"
strFilePath = ImagePath & RecID & ".pdf" 'This is the path to the file
on disk.
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePath
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
%>