• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert docx/pptx to mhtml files  RSS feed

 
sourabh girdhar
Ranch Hand
Posts: 71
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am struggling to convert word documents and power point presentations to convert to HTML/MHTML pages.
I am able to convert docs to html using docx4j but it comes out as distorted and creates images etc as separate files (standard HTML).

I have a requirement where users upload docx and pptx files and then I can show them the output HTML in web browser. So I need a single *.mht file output from document.
The kind of output generated by MS word aby saving file as mht is great. I want similar function but in pure java only.

I will deploy the service on Linux so can't even call native commands of Ms Office.

Any help will be appreciated.

Thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement where users upload docx and pptx files and then I can show them the output HTML in web browser. So I need a single *.mht file output from document.

I don't see how the second part follows from the first. Browsers know how to load images referenced in HTML, so it's just a matter of putting correct references in the HTML file, and putting the images and other resources into the proper locations.

What's more, I think MHTML is IE-specific, so it's not much use outside of Windows environments.
 
sourabh girdhar
Ranch Hand
Posts: 71
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

I need to store the contents of HTML files in database and don't want to spend much effort in changing/modifying reference in HTML page.
If I get single page, I can directly store that as BLOB in database.

IE is fine with me as I don't need cross browser compatibility.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!