简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM