简体   繁体   中英

Convert Doc to HTML in .NET Core without OpenXmlPowerTools

I am converting .NET 4.5 project to .NET Core 2.2 and I am trying to find an alternative to OpenXmlPowerTools which is not supporting .NET Core yet.

I tried Net-Core-DocX-HTML-To-PDF-Converter from https://github.com/smartinmedia/Net-Core-DocX-HTML-To-PDF-Converter and it works fine. But I'm not allowed to use this since it is involved with.exe

I also found few alternatives that works if I target project to .NET Standard which I am not supposed to.

Below is the piece of code that uses OpenXmlPowerTools. I am trying to achieve without OpenXmlPowerTools

                    HtmlConverterSettings settings = new HtmlConverterSettings()
                    {
                        PageTitle = "TEST DOCUMENT"
                    };

                    XElement htmlX = HtmlConverter.ConvertToHtml(doc, settings);
                    DocinHtml = htmlX.ToStringNewLineOnAttributes();

Can you please suggest or recommend any other plugin/Components that I can use to just convert DOC to HTML format?

You can use the OpenXmlPowerTools-NetStandard Nuget Package. It is a fork of OpenXmlPowerTools targeting .net standard 2.0.

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.

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