Html2openxml Versions Save

Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments from SharePoint to Word.

2.3.0

2 years ago

What's Changed

New Contributors

2.2.0

3 years ago

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.

2.1.0

3 years ago

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.

2.0

6 years ago

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

1.6

6 years ago

This release is the published version from codeplex.com. Feature/Bug ID correspond to codeplex.com issues tracking.

Changeset:

New Features

  • Add mime type image/jpg which is not standard.
  • Do not trigger WebDownload if image is in base64
  • The generated OpenXml is now more valid (feature #12582)
  • Merge patch request #15945 by daviderapicavoli (support font-family attribute).
  • Provide a logger for better debugging (feature #12947).
  • Heading now support inline style (feature #12949).
  • Hyperlinks handle web site starting directly with www instead of http://.
  • Hyperlink can now have image+text (style is applied).
  • When provisioning images manually, we now allow the user to either provision the image himself or to let the library handle it (feature #13034).
  • Table now support left and right margin = auto (feature #13221)
  • Introduce a new method to start the conversion: ParseHtml which append automatically paragraphs. Old method still exists
  • Expose cookies and request headers when downloading images (feature #13033).
  • Fix <hr> rendering when 2 paragraphs were consecutive (top border is now applied, instead of bottom border, which looks smoother).
  • Merge pull request for adding left & right margin support to paragraph (apply also to <div> and <pre>) (#16943 by eto)
  • Retain spaces inside a <pre> tag
  • Apply text-indent request (feature #13787)
  • Footnotes in <acronym> and <abbr> can now contains links (web protocol + file share) (feature #13785)

Bug fixes

  • Fix inserting a table inside a table creates a blank paragraph at the start (bug #13608).
  • Do not add table borders when already in the style definition (#13594). -Fix bad resolution in class attribute not matching class name containing '_' character (bug #13776).
  • Fix bad width for cell expressed in pixels (bug #13768)
  • Fix value in cellpadding/cellspacing attribute for (bug #13781)
  • Fix applying class name on <span>/<div>/etc... (added by task #12949)
  • Fix closing <blockquote> tag.
  • Fix table shading (bug #13212)
  • Fix rendering <pre> when RenderPreAsTable=false (bug #13127).
  • Fix page-break-after crashing the conversion. Add support for landscape orientation (page-orientation on <body>).
  • Fix parsing font-family name that are surrounded with simple quote (bug #13243)
  • Remove trailing spaces (bug #13454) at the end of lines.
  • Fix class attribute on span continued after the closing tag (bug #13457)
  • Fix resolving heading style (OpenXml is case-sensitive).
  • Fix disposing of Bitmap (rare case)
  • Fix large image in binary 64 bits not rendered (bug #12948).
  • Fix <hr> not rendered if previous paragraph doesn't contain any children.
  • Fix downloading image with local path and which contains %20
  • Fix displaying Heading (embed H style inside a resx - bug #12595). More compliance to Office2010 schema. - Fix indentation of <li> (bug #11214)
  • Fix invalid TableWidth when not specified (bug #12494)
  • Fix a bug on nested table where the TableCell doesn't end with a Paragraph
  • Fix a bug where "caption" style was added as many as there are occurences of <figcaption>