0

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?

Phil Jollans
  • 3,605
  • 2
  • 37
  • 50

1 Answers1

1

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

  • fork (optionally) and clone EricWhiteDev's Open-Xml-PowerTools repository,
  • build the OpenXmlPowerTools.dll assembly from source,
  • put that assembly into a libs folder (or whatever you use), and
  • reference that assembly in your projects.

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

Thomas Barnekow
  • 2,059
  • 1
  • 12
  • 21
  • Thanks Thomas, in fact I have decided that Open-Xml-Power-Tools is not the best option for my application, but it's good to have clarity. – Phil Jollans Nov 24 '19 at 15:22