Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefh/htmlinliner
Packages an HTML document into a single file that embeds all images, favicon, css, scripts, fonts and other url() loaded entries.
https://github.com/stefh/htmlinliner
Last synced: 19 days ago
JSON representation
Packages an HTML document into a single file that embeds all images, favicon, css, scripts, fonts and other url() loaded entries.
- Host: GitHub
- URL: https://github.com/stefh/htmlinliner
- Owner: StefH
- License: mit
- Created: 2022-07-23T09:47:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-28T16:26:25.000Z (over 2 years ago)
- Last Synced: 2024-04-14T13:08:18.998Z (7 months ago)
- Language: C#
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HtmlInliner
Packages an HTML document into a single file that embeds all images, favicon, css, scripts, fonts and other url() loaded entries.This can be usefull when moving CSS to inline style attributes, to gain maximum E-mail client compatibility or Pdf generation from Html.
Code based on [RickStrahl/Westwind.HtmlPackager](https://github.com/RickStrahl/Westwind.HtmlPackager).
## NuGet
[![NuGet Badge](https://img.shields.io/nuget/v/HtmlInliner)](https://www.nuget.org/packages/HtmlInliner)
## Example
``` c#
using HtmlInliner;var htmlInliner = new HTMLInliner();
var inlined = htmlInliner.Process("https://www.google.com");
File.WriteAllText(@"c:\temp\web\google_inlined.htm", inlined);
```