get docx file contents using javascript/jquery

前端 未结 3 1914
一整个雨季
一整个雨季 2020-12-06 08:07

wish to open / read docx file using client side technologies (HTML/JS).

kindly assist if this is possible . have found a Javascript library named docx.js but person

3条回答
  •  执笔经年
    2020-12-06 08:15

    With docxtemplater, you can easily get the full text of a word (works with docx only) by using the doc.getFullText() method.

    HTML code:

    
    
    
    
    

    Getting the source code:

    git clone https://github.com/edi9999/docxtemplater.git && cd docxtemplater
    # git checkout v1.0.4 # Optional
    npm install -g gulp jasmine-node uglify-js browserify
    npm install
    gulp allCoffee
    mkdir build -p
    browserify -r ./js/docxgen.js -s Docxgen > build/docxgen.js
    uglifyjs build/docxgen.js > build/docxgen.min.js # Optional
    

提交回复
热议问题