When running the following code
using (MemoryStream outputStream = new MemoryStream())
{
presentation.SaveToPdf(outputStream);
outputStream.WriteTo(output);
}
The stream is closed in the SaveToPdf method. What results in an exception on the line outputStream.WriteTo(ouput). This is not how I expect it to work. The stream should be left open, otherwise I can not read it. This solution requires me to use a tempory file on disk for converting a stream to pdf what I rather not do.
Is there a solution for this problem?