|105481||Oct 29,2012 06:47 PM UTC||Nov 2,2012 05:13 AM UTC||ASP.NET Web Forms (Classic)||1|
Thank You for your interest in Syncfusion Products.
The error is due to the Stream Position.
When the document is saved in the stream(doc.Save(stream)), its current position moves to the end of file.
While creating the pdf file to add in to the zip folder the current position starts from EOF. So, the file created is empty.
Set the position to 0(zero) before creating the pdf file.
The code is as follows:
MemoryStream stream = new MemoryStream();
stream.Position=0; //This line should be added
zipFile.AddEntry("file.pdf", "", stream);
return new ZipFileResult(zipFile, "TexasExport.zip");
Please let us know if you have any concern.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.