openxml-powertools

Where is the definition of MetricsGetter.GetTextWidth


I am trying to use the Open-XML-Powertools.

I have downloaded the current version from GitHub and I am copying a lot of code from the sample file
Open-Xml-PowerTools-vNext\OpenXmlPowerTools\WmlToHtmlConverter.cs

However, in application I am actually using the nuget package OpenXmlPowerTools Version 4.5.3.2, which is marked as the latest stable version.

Part of this code uses the method MetricsGetter.GetTextWidth:

var w = MetricsGetter.GetTextWidth(ff, fs, sz, runText);

However, this method is not present in the version of MetricsGetter in the nuget package.

Short term I can copy the source code of this function into my application, so will not be a big problem, but which version is up to date?

Is the code in GitHub newer than the code in the nuget package?
Or older?
Is there an alternative method which I should use with the nuget package?


Solution

  • Unfortunately, the NuGet package is very much outdated. Thus, the best approach is to:

    The previously official OfficeDev/Open-Xml-PowerTools repository has been archived.