Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Fri Jun 08, 2012 11:58 am

We are using the Spire.Doc on a web site to convert Word-files, uploaded by users, to PDFs.
Most of the time it works fine but for some Word-files the component fails with the error message: "Stream position is too big."

The code is simply:
Spire.Doc.Document document = new Spire.Doc.Document();
document.SaveToFile(Server.MapPath(UploadPath + guid + ".pdf"), FileFormat.PDF);
The error comes at the second line, when the file is loaded.

If I open the file in OpenOffice (I do not have MS Office) and save it again everything seems to work.
This has happened with not only one but several files.
They have all had extension .doc (not .docx). I don't know with which Word version they have been created but can it be so that your component has problems with older Word versions?


Posts: 1
Joined: Wed Feb 15, 2012 7:16 am

Mon Jun 11, 2012 5:39 am

Spire doc has no that problems with older Word versions. The problems resulted from the location of loading file,
so we suggest that you check the location if it is too long or other problems.
If you still can't solve the problems , we suggest that you send the source file that needs to be loaded to us.

Welcome to contact me. support@e-iceblue.com
iceblue support
e-iceblue support team
contact: nancy.wang@e-iceblue.com
User avatar

Posts: 51
Joined: Wed May 30, 2012 2:02 am

Return to Spire.Doc