Gathering detailed insights and metrics for rn-pdf-generator
Gathering detailed insights and metrics for rn-pdf-generator
Gathering detailed insights and metrics for rn-pdf-generator
Gathering detailed insights and metrics for rn-pdf-generator
react-native-pdf-generator, porting the cordova-pdf-generator to react native.
npm install rn-pdf-generator
Typescript
Module System
Node Version
NPM Version
42.4
Supply Chain
52.6
Quality
69.8
Maintenance
100
Vulnerability
97
License
Objective-C (78.82%)
Java (15.31%)
C# (4.7%)
Ruby (0.91%)
JavaScript (0.26%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
18 Commits
5 Forks
2 Watchers
14 Branches
1 Contributors
Updated on Mar 29, 2021
Latest Version
1.6.4
Package Id
rn-pdf-generator@1.6.4
Unpacked Size
463.34 kB
Size
174.69 kB
File Count
74
NPM Version
6.14.6
Node Version
14.5.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
2
Is a light weight native library that transform HTML to PDF, or even better transform the content of a URL like https://google.com
into a PDF.
The PDF is returned in base64 format so you can use more specialized modules to mail, sharing, visualizing, etc.
Basically this library takes HTML as string or remote and loads the xml into an internal iOS/Android WebKit, then it traverse the web page generating a WYSIWYG PDF document.
This plugin uses a very light weight iOS library for this called BNHtmlPdfKit.
For Android it just use WebView.
1.6.4: Adding React Native 0.6x
compatibility.
1.6.1: Removed deprecated UIWebView.
To install the library:
1 npm i rn-pdf-generator --save 2 react-native link
To transform raw HTML into PDF:
1import PDF from 'rn-pdf-generator'; 2 3PDF.fromHTML(`<P>HELLO WORLD</P>`, `http://localhost`) 4 .then( data => console.log(data)) // WFuIGlzIGRpc3Rpbm.... 5 .catch( err => console.log('error->', err) )
In case you this HTML fetch resources from external servers you can specify the location using the second parameter
<base-url>
.
Transforming a remote webpage:
1 2import PDF from 'rn-pdf-generator'; 3 4PDF.fromURL('https://www.google.com/') 5 .then( data => console.log(data)) // WFuIGlzIGRpc3Rpbm.... 6 .catch( err => console.log('error->', err) ) 7
This demo that generates a PDF and then display it using react-native-pdf plugin.
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/17 approved changesets -- score normalized to 0
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
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
57 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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