Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sun Dec 14, 2014 6:28 am

thank u for your spire.pdf component,now I meet a question when using some of methods of this component,please help me
public ActionResult SaveFile(string username)
{
HttpPostedFileBase uploadfile = Request.Files[0];
uploadfile.SaveAs("f:\\1.pdf");
if (".pdf".Split(',').Contains(Path.GetExtension(uploadfile.FileName).ToLower()))
{
Spire.Pdf.PdfDocument pdf = new Spire.Pdf.PdfDocument();
pdf.LoadFromStream(uploadfile.InputStream);
if (pdf.Pages.Count < 1)
{
pdf.Dispose();
return Content("false|the pdf is empty!");
}
pages = pdf.Pages.Count;
doctext = pdf.Pages[0].ExtractText();
pdf.Dispose();
}
uploadfile.SaveAs("f:\\2.pdf");
}
the result,the 1.pdf has 0 bytes,and the 2.pdf has the normal number of bytes,then why?

jick1978
 
Posts: 4
Joined: Mon Dec 01, 2014 4:04 pm

Mon Dec 15, 2014 7:55 am

Dear jick1978,

Sorry for the delay reply.

I have reproduced this issue and posted it to our dev team, we will inform you if there is any update.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Jan 15, 2015 8:13 am

Hello jick1978,

Sorry to keep you waiting.

We just released a new version of Spire.PDF (Spire.PDF Pack(Hot Fix) Version:3.2.60) to resolve this "stream length changed after loading" problem, please download it via link below and have a try:
http://www.e-iceblue.com/Download/downl ... t-now.html
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.PDF