Convert to HTML

"Docx2HTML version" specialized for HTML conversion of docx files was added from Office Server Document Converter V9.0.

Docx2HTML Features


Convert docx format files edited and saved in Microsoft Word into simple, easy-to-edit HTML. You can easily create Web pages from documents created in familiar Microsoft Word.

Proprietary program to convert Word documents to HTML

  • An independent conversion engine that analyzes docx files edited and saved in Microsoft Word and converts them to HTML.

  • Convert without Microsoft Word installation.

Create simple and extra tag-free HTML

  • Converts HTML to accurate, easy-to-edit HTML that conforms to HTML standard specifications, unlike Microsoft Word's built-in HTML output feature.

  • Only the content (HTML) is generated as output, so it is easier to edit and manage, and can be easily incorporated into existing Web pages.

New features


The new V10.0 version has a number of new features and enhancements to make it more practical to use.
It now also has a table of contents display suitable for mobile devices.

 

Split HTML output

HTML can now be output by splitting a Word document into chapters, sections, and other specified outline level units.

By specifying the "-split" option followed by the desired outline level (1 to 3) when executing from the command line, the document will be split at the heading style and paragraph points of the specified outline level in the Word document and output as an HTML file for each outline level.

By splitting pages, even long documents can be made minimized and easy-to-read Web pages because the amount of scrolling per page can be reduced and the file size to be read at one time can be kept to a minimum.

At this time, if there is a table of contents inserted by the Word table of contents function, the table of contents and its link will be output to all HTML files.
The table of contents can also be output as a separate HTML file by specifying an option. In this case, each HTML file split by outline levels will not output the table of contents. The output HTML file of the table of contents can be loaded into each HTML file using JavaScript, or used to create a page for the table of contents.

 

Page navigation

When outputting split HTML, the "-pagenavi" option can be used to output "Prev/Next" links that allow the user to move through the split HTML pages in order.

Links are output at the top and bottom of the body text. The output link can be in Japanese or English.

 

Enhanced table of contents conversion

Number of enhancements have been made to the table of contents to make it easier to layout and more convenient to use.

  • The entire table of contents section is now output as a <nav class="toc-wrap"> tag in HTML. (<div class="nav-area"> tag in xhtml.)

  • To enable the loading of the table of contents in a separate file, enclose the interior of the tag above with a <div id="toc"> tag.

  • The class attribute of the heading paragraph of the table of contents now outputs "toc-heading" *1.

  • "toc-[n]" *1 ([n] is the value of the table of contents level 1-6) is now output for the class attribute of the paragraph for each item in the table of contents.

  • When HTML is output into separate HTML, a table of contents is output to all of the split HTML files. At this time, "active" is output as the class attribute of the paragraph <p> tag of the table of contents item (the highest hierarchical level in the page) that indicates the own HTML file.

  • When HTML is output into separate HTML, the table of contents can be output as a separate HMTL file (toc-inc.html) by specifying the option. *2

    *1 This value is the default when inserted and unedited by the "Built-In" Word table of contents feature.

    *2 Only the inside of the <nav> tag is output as a separate HTML file for loading with JavaScript. Tags such as <html>, <head>, and <body> are not output.

Table of Contents convenient for mobile

Tag output so that a button for showing/hiding the table of contents can be installed when displayed on a mobile phone.

Note: javascript and CSS are required to install and operate the buttons.

 

Other new optional features

  • Some table decorations created on Word can now be output to HTML styles.

  • Html language codes can now be specified.

Main Features


Various HTML can be converted by specifying options

Command line conversion can be specified by conversion option parameters.

Here are some examples of command line options:

  • -emptyP

    By default, empty lines (lines with only line breaks) in Word are ignored in HTML output. If this option is specified, <p> </p> tags will be outputted. The right example below has this option enabled.

 

This image shows two HTML files side by side. The first HTML page shows empty lines, and the second HTML page shows line break text tags <p></p> to make the line break in the page.

 

 

  • -nonrefid

    Word creates a lot of unreferenced IDs in docx files after repeated editing, but by default Docx2HTML scans the document file and internally deletes unreferenced IDs. If this option is specified, it will not remove them. The right example below has this option enabled.

 

This image shows two HTML files side by side. They both have h1 sections highlighted, image on the right has additional ids specified within the h1 tag.

 

 

  • -endl

    This option outputs a line break at the end of the block tag. This makes it easier to edit and manage after output. The left example below has this option enabled.

 

This image shows two HTML files side by side. the one on the left shows an organized HTML page that is easier to read, each tag has its own line, the HTML on the right shows a more condensed file, there are no breaks and all the HTML flows without breaks to cover the whole page.

 

 

  • -xhtml

    By default, tags in HTML syntax are outputted. If this option is specified, tags in XML syntax are outputted. The right example below has this option enabled.

 

This image shows two Mark up Language files side by side.  The first is an HTML, the second on the right has been modified for XML output.

 

Conversion Option Setting File

  • The conversion option settings file is a file that stores parameter values for conversion options.

  • When executing the command line, specify the name of the conversion option setting file to be read.

  • If you want to repeat a conversion with the same settings, specify a conversion option setting file instead of specifying options each time.

  • Example usage of a conversion options settings file:

    (In the following example, the file is named settings.xml)

     


    -settings settings.xml
    <?xml version="1.0"?>
    <word-to-html-settings>
        <enable-XHTML enable="true"/>
        <enable-endl enable="true"/>
        <enable-empty-paragraph enable="false"/>
        <enable-non-reference-id enable="false"/>
    </word-to-html-settings>

Interface Support


Command-line, .NET and Java interfaces are available as embedding interfaces. These interfaces allow for easy embedding into applications.

Restrictions


  • .doc format documents cannot be converted.

  • Folders and files on Microsoft's OneDrive cannot be specified as the target or destination for conversion.

  • This product discards all layout specifications in a Word-created document and represents content as pure HTML tags.

  • Settings such as table widths, ruled line thicknesses, etc., backgrounds, and text alignment specifications within tables are ignored. These specifications should be specified in CSS for the output HTML. 

  •