iTextSharp + FileStream = Corrupt PDF file

前端 未结 5 1715
有刺的猬
有刺的猬 2020-12-05 16:04

I am trying to create a pdf file with iTextSharp. My attempt writes the content of the pdf to a MemoryStream so I can write the result both into file and a database BLOB. Th

5条回答
  •  情书的邮戳
    2020-12-05 17:04

    documentobject.Close();
    using (FileStream fs = System.IO.File.Create(path)){                        
        Memorystreamobject.WriteTo(fs);
    }         
    

提交回复
热议问题