1

How to convert HTML to MS Word compatible format especially the Image ? Basically I need to convert HTML (Generated from TinyMCE) To MS Word Doc with Images etc (non URL images) and I figured out that MS Word doesn't support Data URI HTML standards . MHTML seems to be a a good option ? How can I convert a HTML with Images to MHTML using Python ?

Nishant
  • 20,354
  • 18
  • 69
  • 101
  • 1
    I can't imagine anyone actually *wanting* to use MHTML (.mht files) if they can possibly avoid it. It's way obsolete, it was *never* a standard, it's not widely supported, and it has no future. There *has* to be a better alternative. IMHO... – FoggyDay Apr 19 '14 at 04:19
  • Quite true but its for an inconvenient requirement :) – Nishant Apr 19 '14 at 04:20
  • 1
    Q: Have you considered RTF? It's also a Microsoft format, it also supports embedded images ... and it has a Python module: http://pyrtf.sourceforge.net/ – FoggyDay Apr 19 '14 at 05:48
  • Will have a look however my source is HTML so I thouhght HTML MHTML would be the easiest . – Nishant Apr 19 '14 at 06:22

1 Answers1

2

Tim Golden's tips on using IE own object may solve this case : http://timgolden.me.uk/python/win32_how_do_i/create-an-mhtml-archive.html

But actually, I also looking for a cross platform solution for this.

swdev
  • 4,997
  • 8
  • 64
  • 106