We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Calling .Save() multiple times

I'm having some problems when calling .Save() multiple times.

First I'm saving to a Stream and then I'm saving the file to disk. However, when I open the file on disk Adobe PDF complains that it is corrupted and cannot be read. If I don't save to Stream before saving to disk, the file is not corrupted and opens fine.

Here's the general outline of my code:

MemoryStream stream = new MemoryStream();
pdfDoc.Save(stream);
pdfDoc.Save(HttpContext.Current.Server.MapPath("/PdfCache") + "PdfFile.pdf");

1 Reply

MW Melba Winshia Syncfusion Team June 25, 2007 10:35 AM UTC

Hi Lars,

I was able to reproduce the problem. Could you please open a new direct – trac incident with subject line as Forum 62857 - DCalling .Save() multiple times ? So that it would be possible for us to provide more details regarding this issue.

Kindly let me know if you have any other questions.

Thanks,
Melba

Loader.
Live Chat Icon For mobile
Up arrow icon