Re: Stream to PDF

Discussion in 'ASP .Net' started by Mark Rae, Dec 12, 2006.

  1. Mark Rae

    Mark Rae Guest

    "Badis" <> wrote in message
    news:...

    > Could pls send a few lines of code because I really don't have a clue how
    > to
    > do it!!?


    Hmm - are you trying to stream an *existing* PDF document, or are you trying
    to *create a new* PDF document and stream that to the browser...?
     
    Mark Rae, Dec 12, 2006
    #1
    1. Advertising

  2. I have saved the content of my PDF as a stream in my database the way that if
    I loose (or delete) my current PDF document from disk I can call the saved
    stream from my database and display it again in a new pdf document.


    "Mark Rae" wrote:

    > "Badis" <> wrote in message
    > news:...
    >
    > > Could pls send a few lines of code because I really don't have a clue how
    > > to
    > > do it!!?

    >
    > Hmm - are you trying to stream an *existing* PDF document, or are you trying
    > to *create a new* PDF document and stream that to the browser...?
    >
    >
    >
     
    =?Utf-8?B?QmFkaXM=?=, Dec 13, 2006
    #2
    1. Advertising

  3. Mark Rae

    Mark Rae Guest

    "Badis" <> wrote in message
    news:...

    >I have saved the content of my PDF as a stream in my database the way that
    >if
    > I loose (or delete) my current PDF document from disk I can call the
    > saved
    > stream from my database and display it again in a new pdf document.


    OK - so, I take it that you are trying to stream a PDF file saved on your
    server's file system, not stream the binary data stored in SQL Server...?

    In which case:

    Response.ContentType = "application/pdf";
    Response.WriteFile(MapPath("xxxxxxxx.pdf"));
    Response.End();
     
    Mark Rae, Dec 13, 2006
    #3
  4. No, it's the way arround. I'm trying to stream the binary data stored in
    database called "Cache" bit simillar to SQL Server to PDF

    Thanks

    "Mark Rae" wrote:

    > "Badis" <> wrote in message
    > news:...
    >
    > >I have saved the content of my PDF as a stream in my database the way that
    > >if
    > > I loose (or delete) my current PDF document from disk I can call the
    > > saved
    > > stream from my database and display it again in a new pdf document.

    >
    > OK - so, I take it that you are trying to stream a PDF file saved on your
    > server's file system, not stream the binary data stored in SQL Server...?
    >
    > In which case:
    >
    > Response.ContentType = "application/pdf";
    > Response.WriteFile(MapPath("xxxxxxxx.pdf"));
    > Response.End();
    >
    >
    >
     
    =?Utf-8?B?QmFkaXM=?=, Dec 13, 2006
    #4
  5. Mark Rae

    Mark Rae Guest

    "Badis" <> wrote in message
    news:...

    > No, it's the way arround. I'm trying to stream the binary data stored in
    > database called "Cache" bit simillar to SQL Server to PDF


    Hmm - OK, well this might be of help:
    http://www.codeproject.com/aspnet/ImageBinaryStream.asp

    It shows how to extract binary data (in this case, a JPEG rather than a PDF)
    from a database (in this case, SQL Server rather than "Cache", whatever that
    is...) and stream it to the browser - the principle is the same...
     
    Mark Rae, Dec 13, 2006
    #5
  6. Thank you very much Mark you have been very helpful its working but I have
    got only one issue is that when excuting this line of code to open the PDF:
    Response.BinaryWrite(myfile); // myfile is the stream converted to byte[]
    type
    the Acrobat Reader 8 is not opening it but asking me if I want to save it or
    Cancel!!?So, always I have to save disk before opening it




    "Mark Rae" wrote:

    > "Badis" <> wrote in message
    > news:...
    >
    > > No, it's the way arround. I'm trying to stream the binary data stored in
    > > database called "Cache" bit simillar to SQL Server to PDF

    >
    > Hmm - OK, well this might be of help:
    > http://www.codeproject.com/aspnet/ImageBinaryStream.asp
    >
    > It shows how to extract binary data (in this case, a JPEG rather than a PDF)
    > from a database (in this case, SQL Server rather than "Cache", whatever that
    > is...) and stream it to the browser - the principle is the same...
    >
    >
    >
     
    =?Utf-8?B?QmFkaXM=?=, Dec 14, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rasmusson, Lars
    Replies:
    1
    Views:
    764
    popov
    Apr 30, 2004
  2. Replies:
    9
    Views:
    644
    Alex Buell
    Apr 27, 2006
  3. Alexander Korsunsky

    get stream mode flags from an opened stream

    Alexander Korsunsky, Feb 17, 2007, in forum: C++
    Replies:
    1
    Views:
    458
    John Harrison
    Feb 17, 2007
  4. Ricardo Pog
    Replies:
    1
    Views:
    439
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    385
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page