Alternative to converting Word to HTML

Asked

Viewed 1,180 times

4

I maintain a site that does not have CMS and often receive requests from the customer asking to put a text with a predetermined formatting.

Usually these texts come in . doc or . docx format from MS Word.

The problem is that they are long texts with various formatting, tables and spacing that need to be respected.

When I try to reason with the client that I can’t just copy and paste the document into a web page, the client doesn’t understand, and charges me agility.

But the process, as many of you may know, is laborious. I usually need to use a tool to convert Word to HTML, but the results are lousy and still generate work to match styles, fix links and adjust images.

My question then is: Have a friendlier way to receive content from customers to create HTML pages if I don’t have CMS features on the site?

Maybe some text editor that already creates a cleaner HTML than Word in the Save as HTML option?

Someone has similar problem?

  • It would be like this here?

  • It is really complicated to do this, as far as I know does not exist, this because the source code that word generates is very dirty

  • 1

    Have you tried the Ckeditor? It includes a "word paste" (Note: I’ve never actually tried to see what the real quality of the conversion is)

1 answer

2

There is no solution ready for this. The conversion solutions will always generate a dirty code and the result is not always reliable, even because Word itself generates a dirty code in your documents.

As you have to do this often, you have 2 options: convince the client to use a CMS or develop an xml processor to convert the docx files he sends into a clean html for your website. Files . doc will take so much work that the best is to convert to docx and dps pass on the processor.

Here has an example of this type of script with php. The example is simplified, but is a bm starting point. And here you find information about the structure of Office Open Xml.

Have fun!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.