You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,19 @@ MHTML (short for MIME HTML) is a web archive that stores a web page’s HTML and
5
5
6
6
Although this code will decode .mht and .mhtml files, in it’s current state it will only decode the base64 content-transfer encoding. It has been tested on .mhtml files exported from SQL Server Reporting Service (SSRS). It features it’s own logging and a way return valid HTML (with images)
7
7
8
-
The return of the decompression value is a List<string[]>. Each List element is a section of the MHTML, and the contents of each List element is as follows:
9
-
string[0] is the Content-Type
10
-
string[1] is the Content-Name
11
-
string[2] is the converted data
8
+
The return of the decompression value is a `List<string[]>`. Each List element is a section of the MHTML, and the contents of each List element is as follows:
9
+
`string[0]` is the Content-Type
10
+
`string[1]` is the Content-Name
11
+
`string[2]` is the converted data
12
12
13
-
Using the getHTMLText() method will return the full HTML and will use the cid:’s to insert the base64 image data (valid in newer browsers).
13
+
Using the `getHTMLText()` method will return the full HTML and will use the cid:’s to insert the base64 image data (valid in newer browsers).
14
14
15
15
16
16
17
17
And here is how to use it
18
18
19
+
```c#
19
20
stringmhtml="This is your MHTML string"; // Make sure the string is in UTF-8 encoding
20
21
MHTMLParserparser=newMHTMLParser(mhtml);
21
22
stringhtml=parser.getHTMLText(); // This is the converted HTML
0 commit comments