All Projects → zVolodymyr → docxjs

zVolodymyr / docxjs

Licence: Apache-2.0 license
Docx rendering library

Programming Languages

typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Labels

Projects that are alternatives of or similar to docxjs

Poi Tl
Generate awesome word(docx) with template
Stars: ✭ 2,306 (+632.06%)
Mutual labels:  docx
docx-to-pdf-on-AWS-Lambda
Microsoft Word doc/docx to PDF conversion on AWS Lambda using Node.js
Stars: ✭ 42 (-86.67%)
Mutual labels:  docx
officeexport-java
三行代码导出自定义样式word
Stars: ✭ 68 (-78.41%)
Mutual labels:  docx
Pswriteword
PSWriteWord is powershell module to create Microsoft Word documents without Microsoft Word installed...
Stars: ✭ 180 (-42.86%)
Mutual labels:  docx
Open Xml Sdk
Open XML SDK by Microsoft
Stars: ✭ 3,005 (+853.97%)
Mutual labels:  docx
my-writing-workflow
Tutorial for converting markdown files in to APA-formatted docs, based on my workflow.
Stars: ✭ 35 (-88.89%)
Mutual labels:  docx
Plagiarism Checker
A utility to check if a document's contents are plagiarised
Stars: ✭ 149 (-52.7%)
Mutual labels:  docx
wordroller
Free Microsoft Word document (aka .docx) processing library for .Net
Stars: ✭ 17 (-94.6%)
Mutual labels:  docx
ilovepdf
Telegram Bot that helps you to convert Images to pdf, pdf to images, 45+ file formats to pdf, more features Soon..
Stars: ✭ 140 (-55.56%)
Mutual labels:  docx
PDFConverter
Best PDF Converter! PDF to any format, pdf2word/excel/xml/html/txt...
Stars: ✭ 94 (-70.16%)
Mutual labels:  docx
P2.
📄 p2. - Simple and secure PDF to PNG server.
Stars: ✭ 191 (-39.37%)
Mutual labels:  docx
Gotenberg
A Docker-powered stateless API for PDF files.
Stars: ✭ 3,272 (+938.73%)
Mutual labels:  docx
kodbox
kodbox is a file manager for web. It is a newly designed product based on kodexplorer. It is also a web code editor, which allows you to develop websites directly within the web browser.You can run kodbox either online or locally,on Linux, Windows or Mac based platforms
Stars: ✭ 1,188 (+277.14%)
Mutual labels:  docx
Documentserver
ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Stars: ✭ 2,335 (+641.27%)
Mutual labels:  docx
documentspark
💖 DocumentSpark - Simple secure document viewing server. Converts a document to a picture of its pages. Content disarm and reconstruction. CDR. Formerly p2. The CDR solution for ViewFinder remote browser.
Stars: ✭ 211 (-33.02%)
Mutual labels:  docx
Phpstamp
The XSL-way templating library for MS Office Word DOCX documents.
Stars: ✭ 150 (-52.38%)
Mutual labels:  docx
mathtype-extension
Calabash extension step to convert MathType OLE objects to MathML
Stars: ✭ 15 (-95.24%)
Mutual labels:  docx
eoffice
Export and import graphics and tables to MicroSoft office
Stars: ✭ 19 (-93.97%)
Mutual labels:  docx
DocX
Convert NSAttributedString / AttributedString to .docx Word files on iOS and macOS
Stars: ✭ 41 (-86.98%)
Mutual labels:  docx
docx-pdf-pagecount
A npm module to page count od pdf and docx files
Stars: ✭ 22 (-93.02%)
Mutual labels:  docx

npm version Support Ukraine

docxjs

Docx rendering library

Demo - https://volodymyrbaydalka.github.io/docxjs/

Usage

<!--optional polyfill for promise-->
<script src="https://unpkg.com/promise-polyfill/dist/polyfill.min.js"></script>
<!--lib uses jszip-->
<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
<script src="docx-preview.min.js"></script>
<script>
    var docData = <document Blob>;

    docx.renderAsync(docData, document.getElementById("container"))
        .then(x => console.log("docx: finished"));
</script>
<body>
    ...
    <div id="container"></div>
    ...
</body>

API

renderAsync(
    document: Blob | ArrayBuffer | Uint8Array, // could be any type that supported by JSZip.loadAsync
    bodyContainer: HTMLElement, //element to render document content,
    styleContainer: HTMLElement, //element to render document styles, numbeings, fonts. If null, bodyContainer will be used.
    options: {
        className: string = "docx", //class name/prefix for default and document style classes
        inWrapper: boolean = true, //enables rendering of wrapper around document content
        ignoreWidth: boolean = false, //disables rendering width of page
        ignoreHeight: boolean = false, //disables rendering height of page
        ignoreFonts: boolean = false, //disables fonts rendering
        breakPages: boolean = true, //enables page breaking on page breaks
        ignoreLastRenderedPageBreak: boolean = true, //disables page breaking on lastRenderedPageBreak elements
        experimental: boolean = false, //enables experimental features (tab stops calculation)
        trimXmlDeclaration: boolean = true, //if true, xml declaration will be removed from xml documents before parsing
        useBase64URL: boolean = false, //if true, images, fonts, etc. will be converted to base 64 URL, otherwise URL.createObjectURL is used
        useMathMLPolyfill: boolean = false, //includes MathML polyfills for chrome, edge, etc.
        showChanges: false, //enables experimental rendering of document changes (inserions/deletions)
        debug: boolean = false, //enables additional logging
    }
    ): Promise<any>

Thumbnails, TOC and etc.

Thumbnails is added only for example and it's not part of library. Library renders DOCX into HTML, so it can't be efficiently used for thumbnails.

Table of contents is built using the TOC fields and there is no efficient way to get table of contents at this point, since fields is not supported yet (http://officeopenxml.com/WPtableOfContents.php)

Status and stability

So far I can't come up with final approach of parsing documents and final structure of API. Only renderAsync function is stable and definition shouldn't be changed in future. Inner implementation of parsing and rendering may be changed at any point of time.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].