Hi everybody,
I'm using a free component to create a PDF file from an html page and it's working fine but when I try to read it it does not load in some computers.
I'm using ADODB.Stream to read the file and I'm thinking that the component may be disabled in the other computers as it works for me.
Any Ideas?
Here is the code
Code:
Response.ContentType = "application/pdf"
Const adTypeBinary = 1
Dim strFilePath
strFilePath = PDFFilename '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
How can I know if the object was created in this line?
Code:
Set objStream = Server.CreateObject("ADODB.Stream")
Thanks,
Juliana