Append byte array to pdf file c# asp.net using FileStream -
Append byte array to pdf file c# asp.net using FileStream -
i working in asp.net web application. trying append byte array pdf file using filestream , want result pdf file containing byte arrays. getting lastly byte array saved in pdf. don't want utilize external library.
here code appending bytes :
public void appendbytetofile(byte[] renderedbytes) { string path = server.mappath("~/printimages/file1.pdf"); var stream = new filestream(path, filemode.append); stream.seek(0, seekorigin.end); if (stream.length==stream.position) { stream.write(renderedbytes, 0, renderedbytes.length); stream.close(); } }
where renderebytes
rdlc object of local study rendered pdf follows
byte[] renderedbytes = report.render("pdf", deviceinfo);
thank you
c# asp.net pdf byte filestream
Comments
Post a Comment