@fauzi-dhuhuri/react-pdf-renderer 4.6.0-zi-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ <p align="center">
2
+ <img src="https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d081a8b9.png" height="280px">
3
+ <p align="center">React renderer for creating PDF files on the browser and server<p>
4
+ <p align="center">
5
+ <a href="https://www.npmjs.com/package/@react-pdf/renderer">
6
+ <img src="https://img.shields.io/npm/v/@react-pdf/renderer?style=flat&colorA=000000&colorB=000000" />
7
+ </a>
8
+ <a href="https://opencollective.com/react-pdf">
9
+ <img src="https://img.shields.io/opencollective/all/react-pdf?style=flat&colorA=000000&colorB=000000" />
10
+ </a>
11
+ <a href="https://github.com/diegomura/react-pdf/blob/master/LICENSE">
12
+ <img src="https://img.shields.io/github/license/diegomura/react-pdf?style=flat&colorA=000000&colorB=000000" />
13
+ </a>
14
+ <a href="https://blockchain.com/btc/address/bc1qj223udztpmt5dck46dw0yap08yum63ht56h90v">
15
+ <img src="https://img.shields.io/badge/BTC-f5f5f5?style=flat&colorA=000000&colorB=000000" />
16
+ </a>
17
+ <a href="https://blockchain.com/eth/address/0x4e1DB76bA0858BbCAa4DD804418D0D9EcF77B1cC">
18
+ <img src="https://img.shields.io/badge/ETH-f5f5f5?style=flat&colorA=000000&colorB=000000" />
19
+ </a>
20
+ </p>
21
+ </p>
22
+
23
+ ## How to install
24
+
25
+ ```sh
26
+ yarn add @react-pdf/renderer
27
+ ```
28
+
29
+ ## How it works
30
+
31
+ ```jsx
32
+ import React from 'react';
33
+ import { Document, Page, Text, View, StyleSheet } from '@react-pdf/renderer';
34
+
35
+ // Create styles
36
+ const styles = StyleSheet.create({
37
+ page: {
38
+ flexDirection: 'row',
39
+ backgroundColor: '#E4E4E4',
40
+ },
41
+ section: {
42
+ margin: 10,
43
+ padding: 10,
44
+ flexGrow: 1,
45
+ },
46
+ });
47
+
48
+ // Create Document Component
49
+ const MyDocument = () => (
50
+ <Document>
51
+ <Page size="A4" style={styles.page}>
52
+ <View style={styles.section}>
53
+ <Text>Section #1</Text>
54
+ </View>
55
+ <View style={styles.section}>
56
+ <Text>Section #2</Text>
57
+ </View>
58
+ </Page>
59
+ </Document>
60
+ );
61
+ ```
62
+
63
+ ### `Web.` Render in DOM
64
+
65
+ ```jsx
66
+ import React from 'react';
67
+ import ReactDOM from 'react-dom';
68
+ import { PDFViewer } from '@react-pdf/renderer';
69
+
70
+ const App = () => (
71
+ <PDFViewer>
72
+ <MyDocument />
73
+ </PDFViewer>
74
+ );
75
+
76
+ ReactDOM.render(<App />, document.getElementById('root'));
77
+ ```
78
+
79
+ ### `Node.` Save in a file
80
+
81
+ ```jsx
82
+ import React from 'react';
83
+ import ReactPDF from '@react-pdf/renderer';
84
+
85
+ ReactPDF.render(<MyDocument />, `${__dirname}/example.pdf`);
86
+ ```
87
+
88
+ ## Contributors
89
+
90
+ This project exists thanks to all the people who contribute. Looking to contribute? Please check our [[contribute]](https://github.com/diegomura/react-pdf/blob/master/.github/CONTRIBUTING.md) document for more details about how to setup a development environment and submitting code.
91
+
92
+ <a href="https://github.com/diegomura/react-pdf/blob/master/.github/CONTRIBUTING.md"><img src="https://opencollective.com/react-pdf/contributors.svg?width=890" /></a>
93
+
94
+ ## Sponsors
95
+
96
+ Thank you to all our sponsors! [[Become a sponsors](https://opencollective.com/react-pdf#sponsors)]
97
+
98
+ <a href="https://opencollective.com/react-pdf#sponsors" target="_blank"><img src="https://opencollective.com/react-pdf/sponsors.svg?width=890"></a>
99
+
100
+ ## Backers
101
+
102
+ Thank you to all our backers! [[Become a backer](https://opencollective.com/react-pdf#backer)]
103
+
104
+ <a href="https://opencollective.com/react-pdf#backers" target="_blank"><img src="https://opencollective.com/react-pdf/backers.svg?width=890"></a>
105
+
106
+ ## License
107
+
108
+ MIT © [Diego Muracciole](http://github.com/diegomura)
109
+
110
+ ---
111
+
112
+ [![](https://img.shields.io/npm/dt/@react-pdf/renderer.svg?style=flat)](https://www.npmjs.com/package/@react-pdf/renderer)