Skip to content

Releases: onizet/html2openxml

Release 3.2.0

24 Sep 07:59
Compare
Choose a tag to compare

Some API methods have been flagged as obsolete with a clear message of what to use instead. Those obsoletes are designed to highlight the expected output of the API and remove disambiguation between all the "Parse" methods. Documentation have been refreshed as well. No breaking changes as it maintain existing behaviour.

ParseHtml (string html) -> ParseBody
Parse(string html) -> ParseAsync

This release bring support for parsing into Header and Footer which was requested by open source project Cervantes (thanks for your support), a collaborative platform designed specifically for pentesters and red teams.

  • Add new public API to allow parsing into Header and Footer #162.
  • Add support for SVG format (either from img src or the SVG node tag)
  • Automatically create the _top bookmark if needed
  • Fix a crash when a hyperlink contains both img and figcation
  • Fix a crash when li is empty #161

Release 3.1.1

04 Sep 10:48
Compare
Choose a tag to compare
  • Fix respecting layout with div/p ending with line break #158
  • Prevent crash when header/footer is incomplete and parsing image #159
  • Fix combining 2 runs separated by a break, 2nd line should not be prefixed by a space

Release 3.1.0

23 Aug 10:45
Compare
Choose a tag to compare
  • Fix table Cell borders are wrongly applied on the run #156
  • Correctly handle RTL layout for text, list, table and document scope #86 #66
  • Support property line-height #52
  • Fallback to background style attribute as many users use this simplified attribute version
  • In HtmlDomExpression.CreateFromHtmlNode, use the correct casting to IElement rather than IHtmlElement, to prevent crash if svg node is encountered

Release 3.0.1

10 Aug 21:01
Compare
Choose a tag to compare

Bug fixes:

  • Ensure to count existing images from header and footer too #113
  • Preserve line break pre for OSX/Windows
  • Prevent a crash when the provided style is missing its type
  • Defensive code to avoid 2 rowSpan+colSpan with a cell in between to crash #59

Release 3.0

08 Jul 20:51
Compare
Choose a tag to compare
  • AngleSharp is now the backend parser for Html
  • Refactoring to use the Interpreter/Composite design pattern, which ease the code maintenance
  • Lots of new unit test cases (200+)
  • Rewriting of list (correct handling of nested style, restarting numbers and consecutive)
  • Rewriting of table (row span, col span, col tags driving styles)
  • Parallel download of images at early stage of the parsing.

Release 3.0-beta

20 Jun 18:37
Compare
Choose a tag to compare
Release 3.0-beta Pre-release
Pre-release
  • AngleSharp is now the backend parser for Html
  • Refactoring to use the Interpreter/Composite design pattern, which ease the code maintenance
  • Lots of new unit test cases (~200)
  • Rewriting of list (correct handling of nested style, restarting numbers and consecutive)
  • Rewriting of table (row span, col span, col tags driving styles)
  • Parallel download of images at early stage of the parsing.

Release 2.3

02 Mar 21:43
Compare
Choose a tag to compare

What's Changed

  • better table border style
  • Bump System.Net.Http from 4.3.0 to 4.3.4 in /src/Html2OpenXml by @dependabot in #99
  • keep processing html on image download error by @albertoantunes in #103
  • Updates DocumentFormat.OpenXml to 2.15.0 by @PrzemyslawKlys in #108
  • support for styling ordered/unordered lists and list elements by @fire-oak in #109

New Contributors

Support of OpenXml 2.12.0+

07 Jan 23:22
6101658
Compare
Choose a tag to compare

This release bring back support to NET 4.6+, NET Standard 1.3 and NET Standard 2.0.

Use new API OpenXmlCompositeElement.AddChild(OpenXmlElement) to add children in the correct order per schema, introduces in OpenXML 2.12.0. Previous version of Html2OpenXml was using internal code via Reflection.

Support of OpenXml >= 2.11.0

09 Jul 21:44
Compare
Choose a tag to compare

Release after the PR #71 , which fix a fatal crash with OpenXml >= 2.11.0.

[TLDR] Details are explained in #70

To conform to the OpenXml XSD, this library use an internal method of OpenXml library, to resolve the order of the style tags.
After some internal refactoring of OpenXml, it appears the internal code was no longer accessible.
Taylor, one of the maintainers of OpenXml gratefully provide a PR to accommodate the new API.

.Net Core support

08 Jan 22:33
d419d3d
Compare
Choose a tag to compare

This is a major new version as this library now support .net standard 1.4, additionaly to net 3.5, 4.0 and 4.6

Changeset:

New Features

  • <blockquote> now process the "cite" attribute to add a footnote
  • Parser is more stable
  • On blank document, the style are automatically registred
  • Text-decoration style attribute can contains multiple values separated by a space
  • Add support for title on link (tooltip)
  • Improve robustness regarding html color parsing (issue #13, issue #4) : can be either rgba, hsla, hex (3 or 6 length) and percentage values are now supported (fix issue #4)

Bug fixes

  • Fix applying style inside table to subsequent cells (issue #12, #17 and #20).
  • Indentation correctly the List Numbering also with nested (issue #11)
  • Fix creating footnote with URI containing a space or where the protocol is missing (bug detected on .netcore)
  • Register missing styles based on predefined MS Word "Accent 1" theme (fix issue #21 and #22)
  • Fix background-color applied to (issue #20)
  • Support inline base64 images that contains newline (issue #8)
  • Fix table column width when percent is used (thanks to jheine for reporting this)
  • Fix bug when font is set multiple times per html tag

FYI

Due to refactoring in the .Net Standard API, this library no longer has dependency on System.Drawing and System.ComponentModel