New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

word-to-html

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

word-to-html

convert docx files to html

  • 3.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
55
Maintainers
1
Weekly downloads
 
Created
Source

word-to-html

feature

  • images
  • font-size color/style
  • table
  • link

example

var path = require("path");
var Word2html = require("word-to-html");
//Word document's absolute path
var absPath = path.join(__dirname, "test.docx");

const word2html = new Word2html(
    absPath,
    {
        outputDir: path.resolve(__dirname, 'temp')
    }
);
word2html.convert();

event

zipReady

  • callback <Function>
    • zip <admZip>

you can use zip to get any resource you need, like images; adm-zip

var path = require("path");
var Word2html = require("word-to-html");
//Word document's absolute path
var absPath = path.join(__dirname, "test.docx");

const word2html = new Word2html(
    absPath,
    {
        outputDir: path.resolve(__dirname, 'temp')
    }
);
word2html.on('zipReady', (zip) => {
    // https://github.com/cthackers/adm-zip/wiki/ADM-ZIP#introduction
    zip.getEntries();
    // extractAllTo
    zip.extractAllTo(path.resolve(__dirname, 'temp/entryfiles'));
});
word2html.convert();

Keywords

FAQs

Package last updated on 18 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc