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