S
Steve
I have a C#.net windows form project that connects to a webservice that
returns a dime attachment (pdf document). I need the winform to open and
load the pdf document into acrobat reader. I do not want to write the file
to the hard drive to create a path so that I can call
System.Diagnostics.Process.Start("AcroRd32.exe", strFileName); if I do not
have too.
I have a web project with an aspx page that opens the file without writing
to a filepath. I am looking for a similar solution in my winform.
Here is my web project aspx code:
System.IO.Stream objAtt = objResponseContext.Attachments[0].Stream;
byteContent = new Byte[objAtt.Length];
int len = objAtt.Read(byteContent, 0, (int)objAtt.Length);
Response.ContentType = "Application/pdf";
Response.BinaryWrite(byteContent);
Response.End();
The above code opens acrobat reader and loads the document.
I need some help finding a similar solutiion to the Response.ContnetType and
Response.BinaryWrite in windows forms. I would like to open the byteContent
directly into Acrobat reader. I am not sure how to do this.
returns a dime attachment (pdf document). I need the winform to open and
load the pdf document into acrobat reader. I do not want to write the file
to the hard drive to create a path so that I can call
System.Diagnostics.Process.Start("AcroRd32.exe", strFileName); if I do not
have too.
I have a web project with an aspx page that opens the file without writing
to a filepath. I am looking for a similar solution in my winform.
Here is my web project aspx code:
System.IO.Stream objAtt = objResponseContext.Attachments[0].Stream;
byteContent = new Byte[objAtt.Length];
int len = objAtt.Read(byteContent, 0, (int)objAtt.Length);
Response.ContentType = "Application/pdf";
Response.BinaryWrite(byteContent);
Response.End();
The above code opens acrobat reader and loads the document.
I need some help finding a similar solutiion to the Response.ContnetType and
Response.BinaryWrite in windows forms. I would like to open the byteContent
directly into Acrobat reader. I am not sure how to do this.