I am using Aspose.Words 6.3.0.0 Runtime Version v2.0.50727. When attempting to convert the attached document I get the following error:
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.__Error.EndOfFile()
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadUInt32()
at .ଔ.ଗ()
at 㻦.䀂…ctor(ଔ reader)
at 㻦.㾧.㿄()
at 㻦.㾧.(Stream ӹ)
at 㻦.㾧.(String ӷ)
at 㻦.㾧.㾾(String ⯡)
at 㻦.㾧.㼜(String ⯡, FontStyle ए, Boolean 㾻)
at 㻦.㾧.ে(String ⯡, FontStyle ए, Boolean 㾻)
at 㹌.㻔…ctor(㺂 context, String familyName, FontStyle requestedStyle)
at 㹌.㼧…ctor(㺂 context, String familyName, FontStyle requestedStyle)
at 㹌.㻔.㻡(㺂 , String ⯡, FontStyle 㻢, Boolean 㻣)
at 㹌.㼕.ে(String ⯡, FontStyle ए, Boolean 㻣)
at 㹌.䄜.䄤(㝈 䄆)
at 㹌.䃿.㰀(㝈 䄆)
at 㹌.䇩.VisitGlyphs(㝈 glyphs)
at 㝁.㝈.Accept(㝄 visitor)
at 㝁.㝂.Accept(㝄 visitor)
at 㝁.㞕.Accept(㝄 visitor)
at 㝁.㝂.Accept(㝄 visitor)
at 㝁.㞕.Accept(㝄 visitor)
at 㝁.㝂.Accept(㝄 visitor)
at 㝁.㞕.Accept(㝄 visitor)
at 㝁.㝂.Accept(㝄 visitor)
at 㝁.㝅.Accept(㝄 visitor)
at 㹌.䇩.㫦(㝀 Ԃ)
at Aspose.Words.Document.SaveToPdf(Int32 pageIndex, Int32 pageCount, Stream stream, PdfOptions options)
at CGG.eB_Powertools.QRR.Logic.SaveDocAsPdf(MemoryStream Orig_File)
If I remove the bullets in the document it works fine, if l leave the bullet in it fails. Please note this being done using a memory stream with the code shown below:
private System.IO.MemoryStream SaveDocAsPdf(System.IO.MemoryStream Orig_File)
{
System.IO.MemoryStream stream;
Aspose.Words.License license_Word;
Aspose.Words.Document doc;
try
{
//license
license_Word = new Aspose.Words.License();
license_Word.SetLicense(“Aspose.Total.lic”);
//end license
stream = new System.IO.MemoryStream();
//Load the document so it can be saved
Orig_File.Position = 0;
doc = new Aspose.Words.Document(Orig_File);
doc.SaveToPdf(0, doc.PageCount, stream, null);
CGG.eB_Powertools.QRR.MemoryManagement.FlushMemory();
return stream;
}
catch (Exception ex)
{
throw new ApplicationException(null, ex);
}
finally
{
stream = null;
license_Word = null;
doc = null;
}
}