I’m trying to generate PDF file in memory using MemoryStream. But MemoryStream is closed and unaviable for reading after render method is completed.
I have seen an example on how to do it in Java using ByteArrayOutputStream but no example was provided in .NET.
MemoryStream msPDF = new MemoryStream();
pd4ml.render(msHTML,msPDF, new System.Uri(“http://localhost/cf”));
byte baPDF = new byte[msPDF.Length];//this line produces an exception