Exception when adding tif image to word document

Hello,

I am getting this exception below on a clients machine when I try to add a tif image to a word document. I am using the Aspose.Words.dll version 4.2.5.0.

Thanks,
JP

2007-10-16 14:25:26,203 [2508] ERROR CMS [] - Exception: System.Runtime.InteropServices.ExternalException
Message: A generic error occurred in GDI+.
Source: System.Drawing
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(Stream stream, ImageFormat format)
at x011d489fb9df7027.x6a58504ecf397a6c.xab908fa3ddec4028(Image xe058541ca798c059, Stream xcf18e5243f8d5fd3)
at Aspose.Words.DocumentBuilder.InsertImage(Image image, RelativeHorizontalPosition horzPos, Double left, RelativeVerticalPosition vertPos, Double top, Double width, Double height, WrapType wrapType)
at Aspose.Words.DocumentBuilder.InsertImage(Image image)
at CMS.Ui.Brief.Util.BriefCreator.AddBriefDocumentImage(DocumentBuilder docBuilder, String filename, Boolean firstFrameOfImage, Boolean lastFrameOfImage)

Hi

Thanks for your request. I have tried to insert .TIF image into the document using the latest version of Aspose.Words (v 4.4.1.0) and it seems that all works fine on my side.

The latest version of Aspose.Words is available for download from here.

Also, please, attach some code that will allow me to reproduce this problem.

Best regards.

Hi,

I believe this to be machine specific and potentially security related on the folder that the save is occurring on. I cannot reproduce this problem on other machines and from searching the internet the exception " A generic error occurred in GDI+" might be security related.

Can you tell me where the Aspose code saves the image to in the above call stack… Image.Save(…)

Is it the Aspose.Words.Document that we are adding to or some temporary location?

Thanks,
JP

Hi

Aspose.Words doesn’t save the images in the temporary folder during inserting images into the document. Please, make sure that you use the latest version of Aspose.Words.

Best regards.