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 :

172 questions
29
votes
8 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
  • 4,081
  • 5
  • 32
  • 42
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
  • 10,558
  • 27
  • 84
  • 126
14
votes
6 answers

How to edit .mht (web archive) files?

I'm faced with situation when I need to edit a .mht file (for example: add some text to site). Could you please suggest a way of editing .mht (web archive) files? What I've tried: (editors like: notepad, word); I-Explorer add-ons (like HTML Quick…
slisnychyi
  • 1,832
  • 3
  • 25
  • 32
13
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,959
  • 3
  • 55
  • 95
12
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,480
  • 3
  • 21
  • 39
12
votes
5 answers

Content Type for MHT files

What is the content type for MHT files?
Krishna Kumar
  • 4,834
  • 13
  • 46
  • 46
12
votes
2 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
  • 13,876
  • 5
  • 21
  • 44
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,189
  • 2
  • 22
  • 30
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
  • 52,548
  • 16
  • 116
  • 154
7
votes
1 answer

How to render a .mht file inside an iframe

I want to take a snapshot of a page using headless chrome which will return a file to me, so I am creating an mht file as it will contain more information about the web page. So, now I want to render this snapshot inside an iframe but I am unable to…
iamsaquib8
  • 414
  • 6
  • 15
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,778
  • 5
  • 44
  • 66
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
  • 12,284
  • 14
  • 65
  • 94
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
  • 5,060
  • 4
  • 28
  • 41
6
votes
1 answer

How do I host an mhtml file on a webserver?

I want to just be able to get people to go a link to an mhtml file hosted on a server and be able to see the fully formatted webpage that you'll see when you save the file and open it in Google Chrome (Apparently IE works as well, Firefox and…
Raymo111
  • 514
  • 8
  • 24
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
1
2 3
11 12