@types/html-docx-js
TypeScript icon, indicating that this package has built-in type declarations

0.3.4 • Public • Published

Installation

npm install --save @types/html-docx-js

Summary

This package contains type definitions for html-docx-js (https://github.com/evidenceprime/html-docx-js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-docx-js.

index.d.ts

/// <reference types="node" />

/**
 * To generate DOCX, simply pass a HTML document (as string) to this method
 * to receive `Blob` (or `Buffer`) containing the output file.
 */
export function asBlob(
    /**
     * An HTML formatted string. It should be a complete, valid HTML
     * (including DOCTYPE, `html` and `body` tags).
     * This may be less convenient, but gives you possibility of including
     * CSS rules in `style` tags.
     */
    html: string,
    /** Additional options for controlling page setup for the document. */
    options?: {
        /**
         * Page orientation. Must be `landscape` or `portrait` (default).
         */
        orientation?: "landscape" | "portrait" | undefined;
        /**
         * A map of margin sizes (expressed in twentieths of point, see
         * [WordprocessingML documentation](http://officeopenxml.com/WPsectionPgMar.php)
         * for details).
         */
        margins?: {
            /** The top page margin (default: 1440, i.e. 2.54 cm). */
            top?: number | undefined;
            /** The right page margin (default: 1440). */
            right?: number | undefined;
            /** The bottom page margin (default: 1440). */
            bottom?: number | undefined;
            /** The left page margin (default: 1440). */
            left?: number | undefined;
            /** The margin for the header (default: 720). */
            header?: number | undefined;
            /** The margin for the footer (default: 720). */
            footer?: number | undefined;
            /** The margin for the gutter (default: 0). */
            gutter?: number | undefined;
        } | undefined;
    },
): Blob | Buffer;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Jacob Fischer.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.43,239ts5.8
0.3.43,239ts5.7
0.3.43,239latest
0.3.43,239ts4.5
0.3.43,239ts4.6
0.3.43,239ts4.7
0.3.43,239ts4.8
0.3.43,239ts4.9
0.3.43,239ts5.0
0.3.43,239ts5.1
0.3.43,239ts5.2
0.3.43,239ts5.3
0.3.43,239ts5.4
0.3.43,239ts5.5
0.3.43,239ts5.6
0.3.43,239ts5.9
0.3.1152ts3.6
0.3.1152ts3.7
0.3.1152ts3.8
0.3.1152ts3.9
0.3.1152ts4.0
0.3.1152ts4.1
0.3.1152ts4.2
0.3.1152ts4.3
0.3.1152ts4.4
0.3.052ts3.0
0.3.052ts3.1
0.3.052ts3.2
0.3.052ts3.3
0.3.052ts3.4
0.3.052ts3.5

Version History

VersionDownloads (Last 7 Days)Published
0.3.43,239
0.3.31
0.3.211
0.3.1152
0.3.052

Package Sidebar

Install

npm i @types/html-docx-js

Weekly Downloads

2,930

Version

0.3.4

License

MIT

Unpacked Size

6.07 kB

Total Files

5

Last publish

Collaborators

  • types