Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

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.LoadFromFile(location);
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?

Cheers,
Magnus

roirecruit
 
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
Nancy
e-iceblue support team
contact: nancy.wang@e-iceblue.com
User avatar

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

Return to Spire.Doc