We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Manipulate ".EMF" files with Aspose.Imaging


i switch this question from the Aspose.Cells forum to this because i need help for manipulating “.EMF” Files.

About my problem:
I have to manipulate embedded spreadsheets in a word (docx) document. For each spreadsheet the docx contains also a image of the spreadsheet data, which a user will see if he opens the document in Word. This image is a “.EMF” file. Now in my application, i´m manipulating the spreadsheet with aspose.cells which works fine. After this i have to replace the existing EMF file in the .docx document structure with an image of the new\change worksheet data.
For this, i use the Aspose.Cells.Rendering.SheetRender object where i can save a worksheet"screenshot" as “.EMF” file. But here is my problem. I can´t configure a custom size for this saved image. I need a new file with the same size as the original one.

Your collegue of the Cells forum told me that i should aus the aspose.imaging component

What i need exactly :
I have to “crop” or extend the size of the new “.EMF” Image (without zooming of the content).
I´ve tried the Aspose.Imaging.Image.Load function but i
got a “Cannot open an image. The image file format may be not
supported at the moment” exception.

Do you have a solution for my problem?


Hi Christoph,

Thank you for contacting Aspose support.

I am afraid, EMF is not one of the supported file formats for Aspose.Imaging for .NET API, that is the reason when you loaded an EMF in an instance of Image, you got the ImageLoadException. Metafiles (EMF & WMF) are supported by Aspose.Imaging for Java only. If you are interested in Java version of the Aspose.Imaging API, I would be more than happy to guide you further.