Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004

    Unhappy Unanswered: Binary File Streaming w/ASP Problem

    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

      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.Type = adTypeBinary
      objStream.LoadFromFile strFilePath
      Response.BinaryWrite objStream.Read
      Set objStream = Nothing
    How can I know if the object was created in this line?
      Set objStream = Server.CreateObject("ADODB.Stream")

    Last edited by julygis; 12-15-04 at 11:13.

  2. #2
    Join Date
    Nov 2003
    Christchurch, New Zealand
    Unless you have OnError Resume Next you will get an error message if the creation fails.

    This is all server side code though right? So it's not going to be a problem with the component.....

    Have you checked to ensure that all the machines have Acrobat on them?

    Rather then using the ADODB stream why not use the FileSystemObject stream??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts