Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/html-to-pdfmake

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/html-to-pdfmake

TypeScript definitions for html-to-pdfmake

  • 2.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/html-to-pdfmake

Summary

This package contains type definitions for html-to-pdfmake (https://github.com/Aymkdn/html-to-pdfmake#readme).

Details

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

index.d.ts

// Type definitions for html-to-pdfmake 2.1
// Project: https://github.com/Aymkdn/html-to-pdfmake#readme
// Definitions by: Martin Zloch <https://github.com/me>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 4.5

/**
 * This module will convert some basic and valid HTML code to its equivalent in pdfmake.
 * @see https://www.npmjs.com/package/html-to-pdfmake
 */
declare function htmlToPdfmake(
    html: string,
    options?: Partial<{
        /**
         * You can overwrite the default styles using defaultStyles.
         * Please, note that the above default styles are stronger than the ones defined in the style classes.
         */
        defaultStyles: import("pdfmake/interfaces").StyleDictionary;
        /**
         * You can overwrite the default sizes for the old HTML4 tag <font> by using fontSizes. It must be an array with 7 values
         */
        fontSizes: [number, number, number, number, number, number, number];
        /**
         * By passing replaceText as a function with two parameters (text and nodes) you can modify the text of all the nodes in your HTML document.
         */
        replaceText: (text: string, nodes: HTMLElement[]) => string;
        /**
         * By passing tableAutoSize with true, then the program will try to define widths and heights for the tables, based on CSS properties width and height that have been provided to TH or TD.
         */
        tableAutoSize: boolean;
        /**
         * If you use Node, then you'll have to pass the window object
         */
        window: import("jsdom").DOMWindow;
    }>,
): import("pdfmake/interfaces").Content;

export = htmlToPdfmake;

Additional Details

  • Last updated: Sat, 23 Jul 2022 22:02:25 GMT
  • Dependencies: @types/pdfmake, @types/jsdom
  • Global values: none

Credits

These definitions were written by Martin Zloch.

FAQs

Package last updated on 23 Jul 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