Gathering detailed insights and metrics for @react-pdf/textkit
Gathering detailed insights and metrics for @react-pdf/textkit
Gathering detailed insights and metrics for @react-pdf/textkit
Gathering detailed insights and metrics for @react-pdf/textkit
npm install @react-pdf/textkit
@react-pdf/textkit@5.0.1
Published on 26 Nov 2024
@react-pdf/renderer@4.1.5
Published on 26 Nov 2024
@react-pdf/render@4.0.2
Published on 26 Nov 2024
@react-pdf/reconciler@1.1.3
Published on 26 Nov 2024
@react-pdf/layout@4.1.3
Published on 26 Nov 2024
@react-pdf/renderer@4.1.4
Published on 18 Nov 2024
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
15,019 Stars
1,042 Commits
1,188 Forks
100 Watching
9 Branches
143 Contributors
Updated on 28 Nov 2024
JavaScript (99.87%)
Shell (0.09%)
HTML (0.03%)
CSS (0.01%)
Cumulative downloads
Total Downloads
Last day
-5.9%
111,144
Compared to previous day
Last week
1.4%
623,190
Compared to previous week
Last month
12.6%
2,607,457
Compared to previous month
Last year
59.5%
25,404,317
Compared to previous year
React renderer for creating PDF files on the browser and server
This package is used to create PDFs using React. If you wish to display existing PDFs, you may be looking for react-pdf.
1yarn add @react-pdf/renderer
1import React from 'react'; 2import { Document, Page, Text, View, StyleSheet } from '@react-pdf/renderer'; 3 4// Create styles 5const styles = StyleSheet.create({ 6 page: { 7 flexDirection: 'row', 8 backgroundColor: '#E4E4E4', 9 }, 10 section: { 11 margin: 10, 12 padding: 10, 13 flexGrow: 1, 14 }, 15}); 16 17// Create Document Component 18const MyDocument = () => ( 19 <Document> 20 <Page size="A4" style={styles.page}> 21 <View style={styles.section}> 22 <Text>Section #1</Text> 23 </View> 24 <View style={styles.section}> 25 <Text>Section #2</Text> 26 </View> 27 </Page> 28 </Document> 29);
Web.
Render in DOM1import React from 'react'; 2import ReactDOM from 'react-dom'; 3import { PDFViewer } from '@react-pdf/renderer'; 4 5const App = () => ( 6 <PDFViewer> 7 <MyDocument /> 8 </PDFViewer> 9); 10 11ReactDOM.render(<App />, document.getElementById('root'));
Node.
Save in a file1import React from 'react'; 2import ReactPDF from '@react-pdf/renderer'; 3 4ReactPDF.render(<MyDocument />, `${__dirname}/example.pdf`);
This project exists thanks to all the people who contribute. Looking to contribute? Please check our [contribute] document for more details about how to setup a development environment and submitting code.
Thank you to all our sponsors! [Become a sponsors]
Thank you to all our backers! [Become a backer]
MIT © Diego Muracciole
No vulnerabilities found.
Reason
30 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 4/26 approved changesets -- score normalized to 1
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
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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