Export Files to HTML

The File Content Extraction Filter SDK allows you to extract text from many different file formats. File Content Extraction also supports conversion of many file formats into HTML so that documents can be viewed in a web browser. File Content Extraction has a dedicated HTML Export API, but if you are already using the Filter SDK you can access some functionality of HTML Export through the Filter API.

NOTE: There are several requirements that must be met in order to use HTML Export through the Filter API:

  • Your license must enable HTML Export.
  • You must copy the binaries provided in the PLATFORM/html directory of the SDK into the PLATFORM/bin directory. The SDK does not include these binaries in the bin directory, to avoid the increase in size for applications that do not require HTML Export.
  • When viewing the exported HTML in a web browser, you must have JavaScript enabled.

To export a file to HTML

  • In the .NET API, call the method ExportHtmlToFile on your document object. For example:

    Copy
    using (Session session = new Session(bin_path, license))
    {
        using (Document myDoc = session.Open("input.docx"))
        {
            myDoc.ExportHtmlToFile("output.html");
        }
    }