Results 1 to 3 of 3

Thread: Binary Files

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    Binary Files

    this code works fine to display images, but when I change the strFileName to a .PDF document it doesn't work...is there something else I need to do to view a .PDF?

    Code:
    Const strFileName As String = "C:\Inetpub\wwwroot\pbss\interstate.gif"
            Dim objStream As Stream = File.Open(strFileName, FileMode.Open)
            Dim buffer(objStream.Length) As Byte
            objStream.Read(buffer, 0, objStream.Length)
            objStream.Close()
            Response.BinaryWrite(buffer)

  2. #2

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    How can I get the .PDF document to open with Adobe? The way it is now, it's trying to open in the browser...

  3. #3

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    well, I got it open in Adobe, but am getting an error in adobe. I think I'm getting the worng file size. I'm using: FileByteArray = objDR("bid_document") but it's returning an inaccurate file size...does anyone know how to get the file size of a blob?

Posting Permissions

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



Click Here to Expand Forum to Full Width