473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
Nov 15 '05 #1
3 7358
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

Nov 15 '05 #2
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:e2**************@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

Nov 15 '05 #3
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

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ianstirkcv | last post by:
Hello, I wonder if you can please help… We are running a web application built using .net framework version 1.0, service pack 2, running on Windows 2000 server, service pack 3. The server has...
2
by: shyamal | last post by:
I want to display memory content using C++ on LINUX. For example, the user may ask to display 256 bytes from 0x1000ff00. The problem is , if any location is invalid, the program will coredump...
5
by: Tomaz Koritnik | last post by:
Hi I have many short HTML files stored in a binary stream storage to display descriptions for various items in application. HTML would be display inside application using some .NET control or...
8
by: Bob Dufour | last post by:
We got a windows form application that we wrote in VB.Net. Essentially its a manager for a list of persons and their contacts and some other info about the persons. No rocket science but lots of...
11
by: prats | last post by:
I want to write a GUI application in PYTHON using QT. This application is supposed to take in Japanese characters. I am using PyQt as the wrapper for using QT from python. I am able to take input...
5
by: ljuljacka | last post by:
I'm trying to display resized images. Locations of images are fetched from database. The problem is that with the following code, I get only the first image displayed: <?php...
3
by: =?Utf-8?B?QXJ1bmVzaCBNb2hhbg==?= | last post by:
Hello All: I have an ASPX A.ASPX where I am displaying realtime data using embedded ASPX page B.ASPX. When I go to next page/previous page from A.ASPX page, I am able to go to next/previous...
1
by: tkubaska | last post by:
This is curious and hoping someone can enlighten me. Inside a C# console app I do decimal mydecimal; mydecimal=2.0m; and then break and look at the memory window. I diplay the address of...
0
by: Hypnotik | last post by:
My program is to simulate cache memory. I read in the info from 2 external files, 1) access 2) data in memory. When I read the information in I display the info...and it is all correct. However...
11
by: Usenet User | last post by:
..NET 1.1/2.0 I have a need to display high-resolution scrollable images in a .NET application (Windows Forms). One well known solution is to create a Panel with AutoScroll set to "true" and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.