Free Support Forum -

Insert a tif

I think something is wrong with your forums search engine. I'm sure this is a common question but I can not find it.

Can any one tell me the aspose equivalant of:

oBookMark = "SalesRepSignature";

string sigFile = @"c:\SalesRep1sig.tif";

oWordDoc.Bookmarks.get_Item(ref oBookMark).Range.InlineShapes.AddPicture(sigFile,ref missing,ref missing,ref missing);

In Aspose.Word this task can be performed as:

DocumentBuilder builder = new DocumentBuilder(doc);


builder.InsertImage(image file name or .NET Image object);

Aspose.Word does not support TIFF images at the moment because we don't know how they are stored inside Word documents, but I've added this is a feature request. JPG, GIF, PNG, BMP and WMF/EMF images are supported.

Cool, Thanks! A .bmp file will work fine for now, although the tif oftion would be great. Thanks Again

Actually, I figured out how to get a tif in there. "ms" is a memory stream and "FileData" is a Byte[] Array that holds my Tiff


Bitmap sig = new Bitmap(ms);

DocumentBuilder builder = new DocumentBuilder(doc);



now if someone can tell me why the image comes out a different size on the word doc when I make a color transparent on my bitmap before inserting it I would really appreciate it.

Hard to say why changing color affects the size.

You can try using InsertImage that takes width and height parameters. Beware Image.Width and Height a in pixels but InsertImage takes valies in points (1/72th inch). Also, pixels are related to resolution (dpi) dots per inch.

The issues you have found earlier (filed as WORDSNET-425) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.