保存的byte []流作为PDF文件asp.net [英] Save byte[] stream as PDF file asp.net
本文介绍了保存的byte []流作为PDF文件asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个数据字节[]流。我需要这个字节保存为PDF格式的磁盘。
任何一个可以帮助
i have a byte[] stream of data. i need to save this byte in to pdf format in disk. can any one help
在此先感谢
推荐答案
一种选择是创建一个的FileStream
对象,并用您的PDF名和扩展名写字节它。例如。
One option is to create a FileStream
object and write the bytes to it with your PDF name and extension. e.g.
byte[] bytes = SomeMethodToGetBytesThatYouDefine();
FileStream fs = new FileStream(@"c:\somepath.pdf",FileMode.OpenOrCreate);
fs.Write(bytes,0,bytes.Length);
fs.Close();
这篇关于保存的byte []流作为PDF文件asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文