Dangl.TextConverter 2.1.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
.NET Standard 1.3 .NET Framework 4.0
dotnet add package Dangl.TextConverter --version 2.1.0
NuGet\Install-Package Dangl.TextConverter -Version 2.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dangl.TextConverter" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dangl.TextConverter --version 2.1.0
#r "nuget: Dangl.TextConverter, 2.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dangl.TextConverter as a Cake Addin
#addin nuget:?package=Dangl.TextConverter&version=2.1.0

// Install Dangl.TextConverter as a Cake Tool
#tool nuget:?package=Dangl.TextConverter&version=2.1.0

Library to transform Rtf and Html to plain text and vice versa

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dangl.TextConverter:

Package Downloads
Dangl.TextConverter.RtfImageConversion The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Library to transform Rtf and Html to plain text and vice versa

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0 36 11/28/2022
2.0.0 4,959 6/25/2022
1.3.9 9,627 1/20/2022
1.3.8 8,379 8/9/2021
1.3.7 8,063 5/10/2021
1.3.6 9,596 12/26/2020
1.3.5 1,631 12/7/2020
1.3.4 2,691 10/6/2020
1.3.3 6,673 7/7/2020
1.3.2 2,884 2/29/2020
1.3.1 9,520 11/21/2019
1.3.0 8,786 8/5/2019
1.2.9 624 7/24/2019
1.2.8 1,252 6/19/2019
1.2.7 658 5/21/2019
1.2.6 996 3/29/2019
1.2.5 831 3/18/2019
1.2.4 583 3/13/2019
1.2.3 3,491 12/28/2018
1.2.2 744 12/11/2018
1.2.1 669 12/8/2018
1.2.0 652 12/8/2018
1.1.5 713 11/29/2018
1.1.4 1,073 9/20/2018
1.1.3 813 7/26/2018
1.1.2 1,052 5/31/2018
1.1.1 917 5/28/2018
1.1.0 976 4/11/2018
1.0.8 1,127 3/19/2018
1.0.7 1,089 1/10/2018
1.0.6 906 1/8/2018
1.0.5 923 12/27/2017
1.0.4 918 12/15/2017
1.0.3 1,009 12/11/2017
1.0.2 1,033 8/11/2017
1.0.1 1,274 12/5/2016
1.0.0 959 9/29/2016

## v2.1.0:
- Dropped tests for `net5.0` and added tests for `net7.0`
- Whitespaces in `span` texts are now better preserved when converting from Html to plain text

## v2.0.0:
- RTF texts now support **images**. They can be read from RTF and also exported. Conversion between RTF and Html will also preserve images. For some operations, images can only be preserved if they are converted to another format, e.g. importing DIB (Device Independent Bitmaps) from RTF requires you to supply an `IRtfImageConverter`, similar when exporting a GIF image to RTF which also requires a conversion. To extract RTF texts from images, you must use the `RtfToText.ConvertRtfToSegmentedText` method
- A new package **Dangl.TextConverter.RtfImageConversion** has been published, which contains converters for both GIF and DIB formats
- _HtmlAgilityPack_ was updated from `1.11.7` to `1.11.43`, which now treats sequences like `<br></br>` as two instances of the `br` tag instead of a single one. This behavior is actually correct, but customers that rely on the old behavior can check the source code examples for how to configure it
- Segmented RTF text now may also return a new type `RtfImageSegment`. Client code should be updated to expect this new type
- The `TextByClass` type now also has a property `ImageNode`, which will be populated if Html text is split by class name and an image node is encountered. Please be aware that image nodes will always lead to a split node and not have any other properties set
- Dropped tests for .NET Core 3.1 and added tests for .NET 6.0

## v1.3.9:
- Fixed a bug where escape sequences terminated with a semicolon `;` were not properly converted from RTF to plain text
- Dropped tests for `netcoreapp2.1` and added tests for `net5.0`

## v1.3.8:
- Fixed a bug where `HtmlToText.ConvertHtmlToPlaintextAndSplitByClassname` removed empty segments at the beginning or the end, even if the segments were matching a class name

## v1.3.7:
- Fixed a bug where the runtime complexity of the `HtmlTableConverter` was rising very fast for deeply nested tables

## v1.3.6:
- Add `net40` as target framework

## v1.3.5:
- Deserializing RTF text now recognizes escape sequences in decimal format, e.g. `\u252` is deserialized as `ü`

## v1.3.4:
- The NuGet package now does specify the **MIT** license
- Dropped tests for `netcoreapp2.2` and added tests for `netcoreapp3.1`
- The `PackageIcon` element is now used for the NuGet package instead of the deprecated `PackageIconUrl`

## v1.3.3:
- Deserializing escaped unicode strings now ignores non printable characters

## v1.3.2:
- Bugfix when deserializing incomplete RTF texts. When an incomplete RTF string was given, this could sometimes lead to a `NullReferenceException`

## v1.3.1:
- Bugfix in `HtmlToText.ConvertHtmlToPlaintextAndSplitByClassname` which could throw an exception if the Html had no plain text representation, e.g. for image only Html

## v1.3.0:
- The generated assemblies now have a strong name. This is a breaking change of the binary API and will require recompilation on all systems that consume this package. The strong name of the generated assembly allows compatibility with other, signed tools. Please note that this does not increase security or provide tamper-proof binaries, as the key is available in the source code per [Microsoft guidelines](https://msdn.microsoft.com/en-us/library/wd40t7ad(v=vs.110).aspx)

## v1.2.9:
- The class `Dangl.TextConverter.Html.HtmlTableConverter` is now public
- The `InternalsVisibleToo` attribute for the assembly was removed to prevent conflicts in applications that sign their binaries

## v1.2.8:
- Bugfix where bookmark elements in Rtf texts with missing closing elements where throwing a `System.InvalidOperationException`
- CI tests are now also run on Linux
- Bugfix where line endings were sometimes not correctly trimmed when running on .NET Core on Linux

## v1.2.7:
- Non-printable unicode escape sequences (`0x00` - `0x08`, `0x0b` and `0x0e` - `0x1f`) are now ignored when converting RTF text to plain text

## v1.2.6:
- Add the `HtmlAgilityPackLegacyBehaviorHelper` utility class and fix an issue where enabling the legacy behavior in HtmlAgilityPack was not thread safe and could fail when simultaneously accessed

## v1.2.5:
- Update **HtmlAgilityPack** dependency. The previously referenced version `1.9.2` was pulled from NuGet due to an unintended, breaking API change. Please see https://github.com/zzzprojects/html-agility-pack/issues/125 for more information about the change
- The `HtmlToText` class now sets the static property `HtmlAgilityPack.HtmlDocument.DisableBehavaiorTagP = false` in its static method calls to ensure compatible behavior. If your own code relies on different behavior, please ensure that this property is always set to its original value after invoking one of the methods on `HtmlToText`. See the README for further details

## v1.2.4:
- Dependencies update

## v1.2.3.:
- Small internal refactoring
- Dependencies update

## v1.2.2:
- Add `bool keepWhitespaceAtLineEnds` parameter to `TextToHtml.TransformPlaintextToHtml()` overload which defaults to false
- Bugfix where Rtf text was sometimes incorrectly read and output when segments between groups started with whitespace

## v1.2.1:
- Add `StringLineStartNormalizationExtensions`

## v1.2.0:
- Update `HtmlAgilityPack` for huge (about 10x) performance improvements in `netstandard` targets, see https://github.com/zzzprojects/html-agility-pack/releases/tag/v1.8.11
- When converting Html to plain text, it's now possible to have the result split by Html class names. Please see the README or https://docs.dangl-it.com/Projects/Dangl.TextConverter for further details
- `public static SegmentedRtf ConvertRtfToSegmentedText(string rtfInput)` was added to `RtfToText`. This will return text segments that contain plain text representations of the texts as well as tags to indicate the opening and closing of bookmarks. This is used, for example, in the [**GAEB & AVA .Net Libraries** by Dangl**IT**](https://www.dangl-it.com/products/gaeb-ava-net-library/) to work with text additions in GAEB 2000 files. Please see the README or https://docs.dangl-it.com/Projects/Dangl.TextConverter for further details
- Added `TextToRtf.ConvertPlainTextToRtf(SegmentedRtf segmentedRtf)` to convert back to Rtf from segmented texts while preserving bookmarks
- Dropped tests for `netcoreapp2.0`, added tests for `netcoreapp2.2`

## v1.1.5:
- Bugfix: Some empty tables caused a `NullReferenceException` when converting them to plaintext via the `HtmlToText` class
- Update of `HtmlAgilityPack` and `System.Text.Encoding.CodePages` (the latter only for `netstandard` targets)

## v1.1.4:
- Dependencies update

## v1.1.3:
- Update of HtmlAgilityPack dependency to include latest bugfixes
- Internal refactoring of the CI/CD pipeline

## v1.1.2:
- Small performance improvements for parsing Rtf text

## v1.1.1:
- Update HtmlAgilityPack to latest stable version 1.8.4

## v1.1.0:
- Switch to HtmlAgilityPack. The HtmlAgilityPack.Core fork is no longer required since the original supports now netstandard

## v1.0.8
- Add `netstandard2.0` target
- Switch build system to NUKE

## v1.0.7
- Fix bug in RtfToText where Rtf annotations were read as plain text

## v1.0.6
- Performance improvements for Rtf texts that contain pictures

## v1.0.5
- Update Html encoding/decoding to preserve correctness in roundtrip scenarios
     
## v1.0.4
- Downgrade to netstandard1.3 and net45 for broader compatibility

## v1.0.3
- Performance improvements

## v1.0.2
- Update ANTLR4 dependencies to latest stable version

## v1.0.1
- Target NETStandard 1.3