displaying pdf from memory....

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default displaying pdf from memory....

    I have a pdf that is contained in a byte[] array in memory and I want to
    display this in a browser window.
    The window will beopenned when a button is clicked on the current web page,
    i.e. a second browser window is displayed, preferably with no menu or tool
    bars....


    Cheers

    Jim


    Guest

  2. Similar Questions and Discussions

    1. #39438 [NEW]: Memory leak PHP Fatal error: Out of memory
      From: nikolas dot hagelstein at gmail dot com Operating system: NETBSD 3.0.1 AMD64 PHP version: 5.2.0 PHP Bug Type: ...
    2. Flash Player 8 huge memory using during drag (all memory gone in few minutes) !!!
      Hi, my name is Ladislav Sopko and I am the project manager for our mapping solution MapWorld. MapWorld is a dynamic flash based cartographic...
    3. Memory consumption of Ruby/mod_ruby combo on Apache [memory leak]
      > I don't think so - I think all the modules are loaded when Apache is It didn't have anything to do with IfModules or even Apache. I had a...
    4. AspNet Process Memory Issue on Win2k Server - Peformance is fine - Memory usuage doesn't stop growing
      We are running our company website on a win2k server running .NET framework 1.0 and IIS 5. The pages consist of mostly static content built from a...
    5. perl memory management - does @array = () free the memory?
      I have a sizable array that I want to clear (i.e. free the memory for other use). Will @array = () alert a garbage collector in Perl to mark the...
  3. #2

    Default Re: displaying pdf from memory....

    You could write it to a temp file and then execute it, it will then
    automatically be opened with the default application for that file extension
    (e.g. acrobat).

    Greetz,
    -- Rob.

    ooo wrote:
    > I have a pdf that is contained in a byte[] array in memory and I want
    > to display this in a browser window.
    > The window will beopenned when a button is clicked on the current web
    > page, i.e. a second browser window is displayed, preferably with no
    > menu or tool bars....
    >
    >
    > Cheers
    >
    > Jim

    Rob Tillie Guest

  4. #3

    Default Re: displaying pdf from memory....

    Try this on the page that loads in the new browser.

    Response.ContentType = "application/pdf"

    Response.BinaryWrite( yourPDFByteArray )

    Response.End

    (Make sure that you remove ALL the HTML tags from the ASPX page or they will
    get appended to the end of the file, corrupting it.)

    David Sandor

    <ooo> wrote in message news:e2u2R4CXDHA.1492@TK2MSFTNGP12.phx.gbl...
    > I have a pdf that is contained in a byte[] array in memory and I want to
    > display this in a browser window.
    > The window will beopenned when a button is clicked on the current web
    page,
    > i.e. a second browser window is displayed, preferably with no menu or tool
    > bars....
    >
    >
    > Cheers
    >
    > Jim
    >
    >

    dsandor Guest

  5. #4

    Default Re: displaying pdf from memory....

    Didn't notice at first that it was a web app :S.
    What DSandor is saying is right.
    Moreover, for opening it in a popup, you'll have to use javascript I guess.
    The simplest way I think is to open a popup window ( you can give params
    here to not display the toolbar etc.), and then reassign the target from the
    form that's going to be submitted to the popup window.

    Greetz,
    -- Rob.

    Rob Tillie wrote:
    > You could write it to a temp file and then execute it, it will then
    > automatically be opened with the default application for that file
    > extension (e.g. acrobat).
    >
    > Greetz,
    > -- Rob.
    >
    > ooo wrote:
    >> I have a pdf that is contained in a byte[] array in memory and I want
    >> to display this in a browser window.
    >> The window will beopenned when a button is clicked on the current web
    >> page, i.e. a second browser window is displayed, preferably with no
    >> menu or tool bars....
    >>
    >>
    >> Cheers
    >>
    >> Jim

    Rob Tillie Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139