Cannot access a closed Stream.

at System.IO.__Error.StreamIsClosed() at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) at iTextSharp.text.pdf.PdfIndirectObject.WriteTo(Stream os) at iTextSharp.text.pdf.PdfWriter.PdfBody.Write(PdfIndirectObject indirect, Int32 refNumber, Int32 generation) at iTextSharp.text.pdf.PdfWriter.PdfBody.Add(PdfObject objecta, Int32 refNumber, Int32 generation, Boolean inObjStm) at iTextSharp.text.pdf.PdfWriter.AddToBody(PdfObject objecta, PdfIndirectReference refa) at iTextSharp.text.pdf.PdfWriter.AddSharedObjectsToBody() at iTextSharp.text.pdf.PdfWriter.Close() at receiptPdf.Page_Load(Object sender, EventArgs e)