React-Pdf: React Renderer For Creating PDF Files On The Browser and Server
React-Pdf: React Renderer For Creating PDF Files On The Browser and Server
React-pdf
React renderer for creating PDF
v2
files on the browser and server.
Rendering process
Components
SVG Images
Try it out!
Hooks
Styling
Fonts
Node API
Advanced
Using Yarn
Using npm
// Create styles
flexDirection: 'row',
backgroundColor: '#E4E4
},
section: {
margin: 10,
padding: 10,
flexGrow: 1
}
});
<Document>
<View style={styles.s
<Text>Section #2</T
v2
</View>
</Page>
Rendering process );
Components
SVG Images
This will produce a PDF document
Hooks
with a single page. Inside, two
Styling different blocks, each of them
Fonts rendering a different text. These
Node API are not the only valid primitives
Advanced you can use. Please refer to the
Components or Examples sections
Playground / REPL
for more information.
Donate
3. Choose where to
render the document
Save in a file
import ReactPDF from '@reac
ReactPDF.render(<MyDocument
Render to a stream
ReactPDF.renderToStream(<My
Quick start guide
Rendering process
</PDFViewer>
Playground / REPL );
Donate
ReactDOM.render(<App />, do
4. Have fun!
Rendering process →
v2
Rendering process
Components
SVG Images
Hooks
Styling
Fonts
Node API
Advanced
Playground / REPL
Donate