Installations
npm install @types/html-to-pdfmake
Developer Guide
Typescript
Yes
Module System
N/A
Score
99
Supply Chain
86.3
Quality
75.5
Maintenance
100
Vulnerability
100
License
Contributors
Languages
TypeScript (99.9%)
JavaScript (0.09%)
Shell (0.01%)
Developer
DefinitelyTyped
Download Statistics
Total Downloads
3,397,719
Last Day
10,771
Last Week
40,184
Last Month
145,065
Last Year
1,394,502
GitHub Statistics
49,103 Stars
88,626 Commits
30,290 Forks
640 Watching
5 Branches
9,977 Contributors
Package Meta Information
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
Publised On
07 Nov 2023
Total Downloads
Cumulative downloads
Total Downloads
3,397,719
Last day
53.7%
10,771
Compared to previous day
Last week
11.8%
40,184
Compared to previous week
Last month
21%
145,065
Compared to previous month
Last year
-7.3%
1,394,502
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
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
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
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: @types/jsdom, @types/pdfmake
Credits
These definitions were written by Martin Zloch, and Cecil Wöbker.
No vulnerabilities found.
Reason
30 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1
- Info: Found text in security policy: SECURITY.md:1
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
- Info: project has a license file: LICENSE:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
- Warn: npmCommand not pinned by hash: types/lodash/scripts/generate-all.sh:5
- Warn: npmCommand not pinned by hash: types/lodash/scripts/generate-all.sh:12
- Info: 20 out of 20 GitHub-owned GitHubAction dependencies pinned
- Info: 8 out of 8 third-party GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/UpdateCodeowners.yml:19
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ghostbuster.yml:20
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/support-window.yml:22
- Info: topLevel 'contents' permission set to 'read': .github/workflows/CI.yml:16
- Info: topLevel 'contents' permission set to 'read': .github/workflows/UpdateCodeowners.yml:14
- Warn: no topLevel permission defined: .github/workflows/format-and-commit.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/ghostbuster.yml:15
- Info: topLevel 'contents' permission set to 'read': .github/workflows/lint-md.yml:7
- Warn: no topLevel permission defined: .github/workflows/pnpm-cache.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/support-window.yml:17
- Warn: no topLevel permission defined: .github/workflows/watchdog-publisher.yml:1
- Warn: no topLevel permission defined: .github/workflows/watchdog-typescript-bot.yml:1
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 27 are checked with a SAST tool
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
7
/10
Last Scanned on 2025-01-27
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