storing PDF as blob/image and retrieving.

  • Greetings,

    No problem with storing the PDF document as an image, the problem comes in pulling it back out.

    Using an ASP.NET page, I thought I could just set the mime-type to Application/PDF but it's just giving me back the raw data.

    I've looked around and I've seen lots of examples for JPEG/GIF that work fine, is there something different on PDF?

    Any code or links would be appreciated.

    Thanks,

    Chris

     

  • Having done this in several projects, I always seem to forget to give it a file name.  Did you remember to do so?

            Response.Buffer = True
            Response.Clear()
            Response.AddHeader("content-disposition", "attachment; filename=" & sFileName)
            Response.ContentType = "application/pdf"
            Response.BinaryWrite(x)
            Response.Flush()
            Response.Close()
    
    where x is the Byte array containg the blob.



    Mark

  • Bingo!  thats it exactlY!

    Thanks!

    Chris

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply