Gathering detailed insights and metrics for @types/html-to-pdfmake
Gathering detailed insights and metrics for @types/html-to-pdfmake
Gathering detailed insights and metrics for @types/html-to-pdfmake
Gathering detailed insights and metrics for @types/html-to-pdfmake
The repository for high quality TypeScript type definitions.
npm install @types/html-to-pdfmake
Typescript
Module System
99.1
Supply Chain
86.3
Quality
75.5
Maintenance
100
Vulnerability
100
License
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
4,324,605
Last Day
1,527
Last Week
54,638
Last Month
222,791
Last Year
1,923,768
NOASSERTION License
49,949 Stars
89,610 Commits
30,418 Forks
641 Watchers
7 Branches
9,958 Contributors
Updated on Jun 25, 2025
Latest Version
2.4.4
Package Id
@types/html-to-pdfmake@2.4.4
Unpacked Size
7.51 kB
Size
2.51 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
-10.8%
1,527
Compared to previous day
Last Week
-3.8%
54,638
Compared to previous week
Last Month
-11.4%
222,791
Compared to previous month
Last Year
21.9%
1,923,768
Compared to previous year
2
npm install --save @types/html-to-pdfmake
This package contains type definitions for html-to-pdfmake (https://github.com/Aymkdn/html-to-pdfmake#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-to-pdfmake.
1/**
2 * This module will convert some basic and valid HTML code to its equivalent in pdfmake.
3 * @see https://www.npmjs.com/package/html-to-pdfmake
4 */
5declare function htmlToPdfmake(
6 html: string,
7 options?: Partial<{
8 /**
9 * If you use Node, then you'll have to pass the window object
10 */
11 window: import("jsdom").DOMWindow;
12 /**
13 * You can overwrite the default styles using defaultStyles.
14 * Please, note that the above default styles are stronger than the ones defined in the style classes.
15 */
16 defaultStyles: import("pdfmake/interfaces").StyleDictionary;
17 /**
18 * In some cases, you may see some extra blank spaces in the PDF. Because removing them could be quite resource consuming, the option is false by default.
19 */
20 removeExtraBlanks: boolean;
21 /**
22 * By default the display:none elements won't be parsed. Set this option to true to display the hidden elements in the PDF.
23 */
24 showhidden: boolean;
25 /**
26 * You can define a list of style properties that should not be parsed.
27 */
28 ignoreStyles: string[];
29 /**
30 * If you're using html-to-pdfmake in a web browser with images, then you can set this option to true
31 * and it will automatically load your images in your PDF using the {images} option of PDFMake.
32 * Using this option will change the output of html-to-pdfmake that will return an object with {content, images}
33 */
34 imagesByReference: boolean;
35 /**
36 * You can overwrite the default sizes for the old HTML4 tag <font> by using fontSizes. It must be an array with 7 values
37 */
38 fontSizes: [number, number, number, number, number, number, number];
39 /**
40 * 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.
41 */
42 replaceText: (text: string, nodes: HTMLElement[]) => string;
43 /**
44 * 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.
45 */
46 tableAutoSize: boolean;
47 }>,
48): import("pdfmake/interfaces").Content;
49
50export = htmlToPdfmake;
51
These definitions were written by Martin Zloch, and Cecil Wöbker.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More