xceedsoftware / DocX

Fast and easy to use .NET library that creates or modifies Microsoft Word files without installing Word.
Other
1.78k stars 475 forks source link

Writing a long docx file #456

Open jianboqi opened 1 year ago

jianboqi commented 1 year ago

Hi, When I use DocX to write a large file, during the Save, it produces error, stream is too long. Do you have any hint for this error? Thank you

在 System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) 在 MS.Internal.IO.Packaging.SparseMemoryStream.CopyMemoryBlocksToStream(Stream targetStream) 在 MS.Internal.IO.Packaging.SparseMemoryStream.WriteToStream(Stream stream) 在 MS.Internal.IO.Zip.ZipIOFileItemStream.Save() 在 MS.Internal.IO.Zip.ZipIOLocalFileBlock.Save() 在 MS.Internal.IO.Zip.ZipIOBlockManager.SaveContainer(Boolean closingFlag) 在 MS.Internal.IO.Zip.ZipIOBlockManager.SaveStream(ZipIOLocalFileBlock blockRequestingFlush, Boolean closingFlag) 在 MS.Internal.IO.Packaging.CompressEmulationStream.Flush() 在 MS.Internal.IO.Packaging.CompressStream.Flush() 在 Xceed.Document.NET.PackagePartStream.Flush() 在 System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) 在 System.Xml.XmlEncodedRawTextWriter.Flush() 在 System.Xml.XmlWellFormedWriter.Close() 在 System.Xml.XmlWriter.Dispose(Boolean disposing) 在 System.Xml.Linq.XDocument.Save(TextWriter textWriter, SaveOptions options) 在 Xceed.Words.NET.DocX.Save(String password) 在

XceedBoucherS commented 1 year ago

Hi,

Can you submit a sample so we can reproduce it.

Thank you