473,503 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open a document in MemoryStream

Hello!

Anyone knows how to open the correct aplication to see de document that
is in MemoryStream?
Like:
I've got an pdf in MemoryStream ( I use BinaryWriter to write it to
MemoryStream), and I
wanna see it with acrobat reader.

--
Thanks,
Nuno Monteiro
nu**@rcsoft.pt
RCSoft, Desenvolvimento de Software, Lda
Telefone: 239708708
Fax: 239708701
Nov 20 '05 #1
3 2928
Cor
Hi Nuno,

I think you are mixing up the Memory Stream with Remoting.

As far as I know is it not possible (or maybe when you use Remoting) to read
the memorystream from one program in another. It is meant to overcome the
writing to disk in some processes.

But have a look at Remoting.

I hope this helps,

Cor
Anyone knows how to open the correct aplication to see de document that is in MemoryStream?
Like:
I've got an pdf in MemoryStream ( I use BinaryWriter to write it to MemoryStream), and I
wanna see it with acrobat reader.

Nov 20 '05 #2
Nuno,
Anyone knows how to open the correct aplication to see de document that is in MemoryStream? I don't believe you can, at least I do not know of a way.

Have you considered writing the BinaryWriter to a FileStream in the "Temp"
folder?

Then Acrobat Reader will be able to open it from the "Temp" folder.

You can use System.IO.Path.GetTempFileName to create the name of a file in
the "Temp" folder, or you could use System.IO.Path.GetTempPath to get the
path, then call System.IO.Path.Combine to combine this path with an existing
name.

Hope this helps
Jay

"Nuno Monteiro" <an*******@discussions.microsoft.com> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl... Hello!

Anyone knows how to open the correct aplication to see de document that is in MemoryStream?
Like:
I've got an pdf in MemoryStream ( I use BinaryWriter to write it to MemoryStream), and I
wanna see it with acrobat reader.

--
Thanks,
Nuno Monteiro
nu**@rcsoft.pt
RCSoft, Desenvolvimento de Software, Lda
Telefone: 239708708
Fax: 239708701

Nov 20 '05 #3
* "Nuno Monteiro" <an*******@discussions.microsoft.com> scripsit:
Anyone knows how to open the correct aplication to see de document that
is in MemoryStream?
Like:
I've got an pdf in MemoryStream ( I use BinaryWriter to write it to
MemoryStream), and I
wanna see it with acrobat reader.


You will have to write the data to disk.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

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

Similar topics

3
8286
by: Dave | last post by:
Hi, I'm trying to create an XML document with XMLTextWriter but I want to store it in memory (not write it to a file like so many examples do). I tried the following but with no luck. Should I not...
2
36132
by: Jackfan | last post by:
I'm using XmlTextWriter now, but it seems it can just be used to create a xml file, how can I do? Thanks in advance! Jackfan
3
10935
by: Nicolas | last post by:
Hi Everybody, I'm working with the MemoryStream and I'm having problems with the ReadBytes method. When I use it, this method never returns bytes!!!! MemoryStream sw = new MemoryStream();...
0
1747
by: Mark Allen | last post by:
Hello, I am creating an RTF document server side for a report. However I am having problems converting images into the required RTF format. I am converting the image into a string (binary)...
2
2117
by: SQLScott | last post by:
For some reason I am drawing a blank on this, so I would be extremely greatful if someone could help me out. I am trying to get a MemoryStream out of a Byte array. How do I get it back out? ...
8
5252
by: jdhancock | last post by:
Can someone give me an example of how I can execute a program on a corporate server and then download the response to the user? I'm not sure if I'm asking this right. Here is the asp code used...
2
3501
by: et_ck | last post by:
Hi, Is it possible to serialize a property of XmlDocument type within a class? For example, I'm able to serialize the following class for the "Items" property. But when I include a property that...
3
5524
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, I am using dotnet remoting with a binarry formatter. I have a property that returns a memorystream that has had a file loaded into it. When I try to access this property though I get an...
3
2827
by: Dylan Parry | last post by:
Hi, I have the following code: private Image _image; public MyImage(string filename) { FileStream file = File.Open(filename, FileMode.Open); _image = Image.FromStream(file);
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7315
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.