New Forum | Previous | Next | (P-PDF) Developers
Topic: Returning a PDF document
Conf: (P-PDF) Developers, Msg: 33776
Date: 1/29/2002 04:31 PM
I have the merging working that I need to generate the PDF document. Now I need to return the document to the browser. However it is being displayed as the source not the document. If I load the document directly in the browser it renders properly, so I think the document is OK. I believe it is a contenttype issue but can't get it working. Here is sample code that displays the problem:
'Set the content type to the specific type that you are sending.
Response.Buffer = true
Response.ContentType = "application/pdf"
Const adTypeBinary = 1
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = adTypeBinary
Set objStream = Nothing