I'm having following code,in this code i am reading the content of file as a stream, after reading it as stream I need to crate new document which will maintain the format after replacement of placeholder,if I m reading file from path it is replacing placeholder write in new file and show it properly with format ,but if im reading the same content using stream it doesnot throw any error,it creates the file ,but while opening it shows file corruptedI'm having following code,in this code i am rea