Free Support Forum -

Convert Word Document DOT File containing DIB Bitmap Image to PDF Format using C# .NET - Unsupported Image Format Resolved


i have a word template with an image (see attachment).

Here is the sample code:

Document doc = new Document(@“C:\”);

using (MemoryStream ms = new MemoryStream())






It throws this exception in doc.Save():

Unsupported image format.

at ?.?.?(? ?)

at ?.?.get_?()

at ?.?.?(? ?)

at ?.?.?(? ?, Boolean ?, Int32 ?, Int32 ?)

at ?.?.?(InlineShape ?)

at ?.?.VisitInlineShape(InlineShape shape)

at Aspose.Word.InlineShape.Accept(DocumentVisitor visitor)

at Aspose.Word.CompositeNode.?(DocumentVisitor ?)

at Aspose.Word.Paragraph.Accept(DocumentVisitor visitor)

at Aspose.Word.CompositeNode.?(DocumentVisitor ?)

at Aspose.Word.Body.Accept(DocumentVisitor visitor)

at ?.?.?(Section ?)

at ?.?.?(Document ?, Stream ?, String ?)

at Aspose.Word.Document.?(Stream ?, String ?, SaveFormat ?)

at Aspose.Word.Document.Save(Stream stream, SaveFormat fileFormat)


Hi Robik,

Thank you for the report. We've logged it so we'll try to fix it asap.

The image was in DIB format. Now supported in Aspose.Word 3.3.1.