Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
aspxページにヒットするphpページがありますhttp://server/default.aspx?xml=abc。このファイルは、クエリ文字列で送信されたxmlを使用してPDFを作成し、.netサーバーに保存します。
http://server/default.aspx?xml=abc
さて、どうすれば生成されたPDFファイルのbytearrayを取得できますか?また、aspxから応答を生成する方法も知りたいです
注:aspでbytearrayを生成するまで完了です
ファイルを開き、バイナリ応答を呼び出し元に書き戻します。
using(var file = new FileStream("", FileMode.Open, FileAccess.Read)) { var byteArray = new byte[file.Length]; var br = new BinaryReader(file); byteArray = br.ReadBytes((int)file.Length); Response.BinaryWrite(byteArray); }