open a document in MemoryStream

  • Thread starter Thread starter Nuno Monteiro
  • Start date Start date
N

Nuno Monteiro

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
(e-mail address removed)
RCSoft, Desenvolvimento de Software, Lda
Telefone: 239708708
Fax: 239708701
 
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
 
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 said:
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.
 
Back
Top