I am running Spire.Office version=2.13.4 targetFramework=net452 and trying to turn a .docx file into an array of bitmaps. Quite simple code actually:
- Code: Select all
public WordDocV2(Stream memoryStream, FileName attachmentFileName)
{
Logger.Debug("Converting Word to Images");
SpireDoc.Document doc = new SpireDoc.Document(memoryStream, SpireDoc.FileFormat.Auto);
// Blows up here \/ \/
Image[] images = doc.SaveToImages(ImageType.Bitmap);
Images = new List<BitmapMetaData>();
foreach (var image in images)
{
var meta = BitmapHelper.SaveTempBitMap((Bitmap) image, false);
Images.Add(meta);
}
}
it churns on this for about 30 seconds and keeps allocating memory until it finally blow up with this error:
An unhandled exception of type 'System.StackOverflowException' occurred in System.Drawing.dll
It looks like a loop of some sort....
I am able to look at the docx file in Word without any problem.
Thoughts?