Page 1 of 1

Publishing a MHT file

Posted: Sun Mar 03, 2019 6:02 am
by alex4orly
I am saving a page from MS Word document into an MHT file

http://communitylifestyleaccommodation. ... ations.mht
When previewing the file on my desktop - it loads and looks OK in the browser (IE), but once I upload it and look at it on the website - in Chrome, it just shows the HTML code behind...

Any idea? Is only IE able to display this correctly?

Thanks

Re: Publishing a MHT file

Posted: Sun Mar 03, 2019 12:25 pm
by lummis
A Google search reveals this
MHT files open in Internet Explorer or, with an add-on, in Firefox and some other browsers. MHTML Converter is one program that converts MHTML files to regular HTML.
But why use a MHT file?

Re: Publishing a MHT file

Posted: Sun Mar 03, 2019 7:27 pm
by alex4orly
Hi Lummis,

MHT is a format that the client can produce by themselves from MS Word, then I provided them with an option to publish / upload it to their website. If document is saved as HTML, word splits that upon saving into two parts, the html file and a folder ...

I am looking for an online / live option to get the website itself to make such a conversion on-the-fly

Still looking....

Cheers

Re: Publishing a MHT file

Posted: Sun Mar 03, 2019 8:14 pm
by lummis
Have you seen this freeware program - haven't used it but it looks as though it should be able to convert the MHT file to HTML - you may want to test the output beforehand though.
https://www.softpedia.com/get/Internet/ ... rter.shtml

Re: Publishing a MHT file

Posted: Sun Mar 03, 2019 8:32 pm
by alex4orly
Thanks Lummis,

I know about this option, I am however looking for a script that can be run on the webpage to display / convert the mht file into an html file at runtime, avoiding the need for the visitor to the site or the customer doing an extra conversion step before uploading the file.

Thanks again

Re: Publishing a MHT file

Posted: Sun Mar 03, 2019 9:09 pm
by BaconFries
Hi Alex, I don't know if it us possible to do with a script alone on upload. Have you considered using one of your favourite methods for displaying content... using a iframe. It may be possible to embed the .mht file into a iframe set at 100% to display the content. Just a idea that could be possible...

Re: Publishing a MHT file

Posted: Sun Mar 03, 2019 9:11 pm
by lummis
You know your client better than me Alex, but if he is producing the MHT file, it is only one extra step to convert it. I would have thought that if he was made aware that the MHT format doesn't work and his website could be easily updated using the converter then that would be the way forward.

It most probably can be done with a script but I think that you will be spending an awful amount of time trying to find a solution and if you are charging out your time to the client then I am sure he would prefer to make the conversion himself. :)