Hi,
i have a word template with an image (see attachment).
Here is the sample code:
Document doc = new Document(@“C:\Test.dot”);
using (MemoryStream ms = new MemoryStream())
{
doc.Save(ms,
SaveFormat.FormatAsposePdf);
ms.Close();
}
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)
Robik