MobileHybridDev
MobileHybridDev

Reputation: 63

How can i convert html content(having images also) to a document file using javascript?

I am trying to capture some content of a div in html (both text and images) and I want to convert that to a doc file so that i can mail it. I am using html5 javascript and jQuery.

I have to convert it on the client side.

Upvotes: 1

Views: 146

Answers (2)

Mark Price
Mark Price

Reputation: 590

Since you have such strict requirements: Email the user a link with a version of the report you want the user to see when they open the doc.

Tell the user to open MS Word, Click File, Open, Then paste the link in.

The user can then save it as a .doc file where ever they want.

Note: By the way this is the wrong answer, Although you've already turned it down, slash197's answer is the correct way to do this and the way i would normally suggest.

That or just email the report as html.

Upvotes: 1

slash197
slash197

Reputation: 9034

Here's your solution http://www.phpdocx.com/. You'll need a server side language to do that, the example uses PHP.

Upvotes: 1

Related Questions