Gathering detailed insights and metrics for @divvit/html-data-to-pdf-utils
Gathering detailed insights and metrics for @divvit/html-data-to-pdf-utils
Gathering detailed insights and metrics for @divvit/html-data-to-pdf-utils
Gathering detailed insights and metrics for @divvit/html-data-to-pdf-utils
npm install @divvit/html-data-to-pdf-utils
Typescript
Module System
Min. Node Version
Node Version
NPM Version
60.9
Supply Chain
87.5
Quality
75.3
Maintenance
50
Vulnerability
98.2
License
JavaScript (98.79%)
HTML (1.21%)
Total Downloads
2,455
Last Day
2
Last Week
2
Last Month
15
Last Year
211
5 Commits
2 Watchers
1 Branches
Updated on Jan 12, 2016
Minified
Minified + Gzipped
Latest Version
0.6.1
Package Id
@divvit/html-data-to-pdf-utils@0.6.1
Size
4.43 kB
NPM Version
3.10.10
Node Version
6.9.5
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
-60%
2
Compared to previous week
Last Month
-31.8%
15
Compared to previous month
Last Year
-18.2%
211
Compared to previous year
Simple and lightweight HTML to text conversion using Node and PhantomJS.
npm install @divvit/html-data-to-pdf-utils
The API exposes a single function 'convert'. Using this function, you can input a multitude of settings, which are further specified below:
1var pdf = require('@divvit/html-data-to-pdf-utils'); 2 3pdf.convert(options, function(result) { 4 5 /* Using a buffer and callback */ 6 result.toBuffer(function(returnedBuffer) {}); 7 8 /* Using a readable stream */ 9 var stream = result.toStream(); 10 11 /* Using the temp file path */ 12 var tmpPath = result.getTmpPath(); 13 14 /* Using the file writer and callback */ 15 result.toFile("/path/to/file.pdf", function() {}); 16});
Calling convert() requires an options object, which includes the following definitions:
1{ 2 "html" : "Path to HTML file", 3 "data" : "Json data passer in html file", 4 "css" : "Path to additional CSS file", 5 "js" : "Path to additional JavaScript file", 6 "runnings" : "Path to runnings file. Check further below for explanation.", 7 "paperSize" : "Two ways to do this, see below", 8 "deleteOnAction" : "true/false (Deletes the created temp file once you access it via toBuffer() or toFile())" 9}
Instead of paths, one can also provide properly escaped source code.
Either supply a paper format, orientation and border (this is the default)
1{format: 'A4', orientation: 'portrait', border: '1cm'}
Or supply a page width, height and border.
1{width: '3in', height: '2in', border: '0.5in'}
See link below for accepted units and formats
npm test
Anh Nguyen, Nino Ulsamer, Divvit AB
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
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