Questions tagged [mhtml]

MHTML, MIME-HTML, is a webpage format that can combine different resources, such as text, images, flash, audio or much more in one file.

In MHTML, the combination of resources such as text, images, flash, etc. can be achieved on through the use of MIME multipart/related content type.

MHTML defines the naming of objects that are normally referred to by URLs and the means of aggregating resources that go together. Two MIME headers, Content-Location and Content-Base, are defined in order to resolve references to other content stored locally in related body parts. Content-Base gives an absolute URL base, or "starting point",for relative URLs that appear in other MIME headers and in HTML documents that do not contain any BASE HTML elements. Content-Location specifies the URL that corresponds to the content of the body part that contains this header.

MHTML is commonly used in emails.


Resources :

157 questions
21
votes
7 answers

How can you programmatically (or with a tool) convert .MHT mhtml files to regular HTML and CSS files?

Many tools have a way to export a .MHT file. I want a way to convert that single file to a collection of files, an HTML file, the relevant images, and CSS files, that I could then upload to a webhost and be consumable by all browsers. Does anybody…
klumsy
  • 3,521
  • 4
  • 27
  • 40
16
votes
4 answers

Sending mhtml emails - C#

I have a requirement to send emails containing both text and Images. So, I have .mhtml file that contains the content that needs to be emailed over. I was using Chilkat for this, but in outlook 2007 it is showing the mhtml file as different…
inutan
  • 9,740
  • 25
  • 74
  • 119
11
votes
4 answers

generate .mht file programmatically

Does anybody know how to generate .mht file programmatically in C#, with embedded images in it? The thing is i have realised that .mht files are capable of embedding images in them, and this embedded images moves with the whole file(mht) when you…
chosenOne Thabs
  • 1,252
  • 3
  • 18
  • 34
11
votes
0 answers

Android: Display .mht or .mhtml in Webview in Application

We are developing an application in which we need to display a Presentation (PowerPoint) file (.ppt or .pptx).. We have heard that no API is available in Android to display Presentation files within our application. So we tried to convert that…
Bhavin Nattar
  • 3,105
  • 2
  • 18
  • 30
11
votes
6 answers

What is the best way of editing .mht(web archive) files?

If you faced with situation when you need to edit .mht file (for example: add some text to site). Could you please suggest the best way of editing .mht(web archive) files? What I've tried: (editors like: notepad, word); I-Explorer add-ons (like…
slisnychyi
  • 1,096
  • 3
  • 15
  • 28
10
votes
4 answers

Downloading MHT files from Chrome

Our SaaS web application uses MHT files for user-created templates. Recently, Chrome started blocking the downloads, showing the following message: This obviously frightens users, and requires some awkward steps to work around, even for a…
Diego Mijelshon
  • 51,805
  • 14
  • 112
  • 150
10
votes
5 answers

Content Type for MHT files

What is the content type for MHT files?
Krishna Kumar
  • 4,744
  • 13
  • 43
  • 46
10
votes
3 answers

Extracting images and text from an mht file

I have a mht file that contains images and some text. When I open it with notepad++, I see xml and then illegible text which I think are images. Can somebody tell me how can I extract images and text from an mht file using a java program? Thanks.
SomeDude
  • 7,432
  • 4
  • 19
  • 33
9
votes
6 answers

How to read or parse MHTML (.mht) files in java

I need to mine the content of most of known document files like: pdf html doc/docx etc. For most of these file formats I am planning to use: http://tika.apache.org/ But as of now Tika does not support MHTML (*.mht) files.. (…
Favonius
  • 13,499
  • 3
  • 52
  • 94
7
votes
2 answers

WPF: Display HTML-based content stored in resource assembly

In my WPF project I need to render HTML-based content, where the content is stored in a resource assembly referenced by my WPF project. I have looked at the WPF Frame and WebBrowser controls. Unfortunately, they both only expose Navigation events…
Philipp Schmid
  • 5,636
  • 5
  • 41
  • 61
7
votes
1 answer

Modifying the content type of an attachment in a CDO.Message object

When I try to add an MHTML file as an attachment to an email message in VBScript, the ContentMediaType is incorrectly set to "message/rfc822" (RFC 822). From what I understand, this is correct according to Microsoft, but is incorrect according to…
Tyler Crompton
  • 11,740
  • 12
  • 59
  • 91
7
votes
1 answer

MHTML File Header Redirect showing source code with MIME segments

I am having an issue getting an iframe to display MHT files: if( strtolower( substr( $filename , -4 ) ) == ".mht" ){ $filename = str_replace( "/" , "\\" , $filename ); header("Content-type: $filetype"); header("Content-Length:…
Andrew Rhyne
  • 4,729
  • 4
  • 25
  • 39
6
votes
2 answers

Programmatically save an MHT without dialog

Is it possible to save a file of any type bypassing the 'save as' dialog? using the WebBrowser Class WebBrowser.ShowSaveAsDialog(); Is the loaded content in a WebBrowser control serializable so it can be saved and retrieved (for redisplay)?
zion
  • 153
  • 3
  • 7
5
votes
1 answer

Read MHTML file

I have a mhtml file in my local folder stored at file_path which contains the user event logs. I am able to open it using the following code: with open(file_path, 'r') as fp: message = email.message_from_file(fp) for part in message.walk(): …
Swap2019
  • 93
  • 4
5
votes
3 answers

view a docx file in C# .NET

I need to create C# .NET solution to view a .docx file directly from the database without writing on the hard disk. What would be the most feasible approach ? One option would be to convert the docx file to .mht format and save in the database as…
chathuradd
  • 165
  • 7
  • 16
1
2 3
10 11