Chart image extracted from Word to EMF - Incorrect size when reinserting in other Word document

Our use case is the following

  • Some Word documents contain an Office OOXML chart
  • Our process needs to access the chart, optionally change the data and save the image as EMF (for preserving vector rendering)
  • The EMF can be later re-inserted in other Word documents

Problem illustrated in the attached ZIP

  • A Word source contains an OOXML chart
  • The ChartToEMF (C# source code included) finds the chart and saves to Output.EMF
  • When manually inserting Output.EMF in a blank Word document (see “PROBLEM - Test Word with EMF image inserted.docx”), the image is incorrect scaled

We have tried many different image output options without success. Your help is much appreciated.

Please let me know how I can attach a zip with example.

@andrelafond You should simple drag and drop zip into the forum message to upload it.

Thanks, here it is. The core code is in Program.cs

Aspose Chart EMF Image - PROBLEM DEMO.zip (7.1 MB)

@andrelafond
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26230

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-26230) have been fixed in this Aspose.Words for .NET 24.1 update also available on NuGet.