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
2
votes
0 answers

Is there any harm in using a fake domain as location in MHTML?

I'm generating mhtml files to package a local page into a single file. At first, reading the specification https://www.rfc-editor.org/rfc/rfc2557 it seemed to me that I can just ditch location all together and use relative paths but I'm running into…
user81993
  • 6,167
  • 6
  • 32
  • 64
2
votes
1 answer

How can I simply convert mhtml file to html file

I'm trying to get a simple data from html files by using beautiful soup 4. But i have a problem when I encounter the mthml file. The html parser is not working in mhtml file. So, i need to convert mhtml files to simple html file. Or load mhtml file…
Danny Lim
  • 21
  • 1
  • 2
2
votes
1 answer

Save DOM in offline web archive(mht format) using ie6

I need to save the DOM in a offline web archive(mht format) using ie6. I need to make offline updates to the web archive and then save them back to the disk. However the "save as..." functionality is not including the DOM updates, is there a way to…
Sam
  • 21
  • 2
2
votes
1 answer

mhtml file not loading/displaying properly in webview for lollipop and marshmallow but on pre-lollipop devices

I have a .mhtml file in my database as byte array. I have written below code and its working fine in pre-lollipop devices. But it is not working on lollipop and marshmallow. Code:- String path =…
2
votes
0 answers

MTHML file can't play a video

I have an MHTML file that contains a video. (that is linked to the .mp4 file) The goal is to have the video play in the MHTML using the built-in web browser MP4 player but chrome browser keeps giving this error message: Blocked script execution in…
naroko
  • 89
  • 4
  • 12
2
votes
0 answers

MHT to HTML to PDF in Unix

I have a project with requires conversion of MHT documents to PDF format. The documents are large size drawings (C, D, E). The documents are manually loaded into my web application (Apache/Tomcat on Unix AIX) and the requirement is to convert the…
Dan E
  • 21
  • 4
2
votes
1 answer

Jsoup Bug? Parsing an .mht Document

i am trying to parse an MHT-Document using Jsoup (Version: 1.7.3). The goal is to open two files and merge them together (joining head and body) to get one complete file. But firstly i got problems parsing the mht file because the parsed result has…
ccDict
  • 633
  • 2
  • 6
  • 17
2
votes
1 answer

How to create MHTML standalone file with same page links

How do you export an MHTML standalone webpage from google chrome that has correctly operating same page links? For instance, download this working example and open it in Chrome from your local machine:

ecoe
  • 4,994
  • 7
  • 54
  • 72
2
votes
0 answers

.mht file looking for local resources

I'm auto-generating .doc files (.mht really) according to this tutorial. Generated files work great locally but not on other computers as the file is requesting the header to be loaded from my local path instead of using the base64 version that is…
boszlo
  • 1,144
  • 10
  • 14
2
votes
3 answers

Generate MHT from HTM file

I have a htm page in my disk (C:\pages\page1.htm). This page link CSS and gif (C:\pages\img\img1.gif, c:\pages\css\css1.css). How can I generate MHT file ?? Only using C# .NET managed.
Alhambra Eidos
  • 1,515
  • 4
  • 21
  • 31
2
votes
1 answer

Issue parsing MHTML

I was able to use this question as a starting point in parsing an "mht" file but the "3D" in the anchor tags (e.g.: [anchor text]>) breaks all the internal links and embedded images. I can have the parser replace "=3D"…
Jesse Hautala
  • 134
  • 10
2
votes
1 answer

Retrieving the entire html with external js/css/images through javascript

I already have a Javascript file (performing some functions), that will be appended to a webpage. Now I want the Javascript to collect the entire webpage along with its html tags, images, external Javascript files and external css files. I don't…
Anto
  • 71
  • 1
  • 8
1
vote
1 answer

How to add mhtml / mht file as relative path

I'm trying add external mhtml resource to css. I have a css entry like this: *background-image: url(mhtml:file://C:/folder/base64.mht!image1); *background-image: url(mhtml:http://domain.com/base64.mht!image1); works well, but I need to add…
Marcin Rogacki
  • 501
  • 6
  • 23
1
vote
2 answers

Convert HTML created by XML, XSL to a MHTML

XML's can be transformed by a browser using XSL. This can be either done by referencing an xsl within the xml by adding the following line within the xml file: Opening this xml file now with…
Vladimir S.
  • 450
  • 2
  • 10
  • 23
1
vote
2 answers

Images in MHT files from MS Word do not display in email

When I email myself sample mhtml files (e.g. from here) images display fine in Outlook. However, when I convert a Word document to mht (Web Archive) format, the images do not display. If I open the file in a browser, the images display fine, or if I…
runrig
  • 6,486
  • 2
  • 27
  • 44