Skip to content

Chagall/react-pdf-table-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React PDF Table Example

Tested on: Firefox 86.0 (Ubuntu) and Chrome Version 89.0.4389.82 (64-bit) (Ubuntu)

Let me know if you guys enjoyed it ✌️

Why this repo even exists?

I've seen people asking everywhere how the hell can you build a Table in react-pdf. The sad truth is that there is still no official component on the library that does it for you. However it doesn't mean that it's not possible, in fact it's not even hard, you just need to get dirty in a tiny bitty of CSS.

In this repository I've built a simple example that shows how you can use <View>, <Text> and some ninja CSS to easily mimic the appearance of a table.

How to run

  • Clone the repository
  • In the terminal go to the repository folder: cd react-pdf-table-example
  • Install the dependencies using yarn or npm, whichever you like: yarn install or npm install
  • Start the project with: yarn startor npm start
  • The project will run automatically on http://localhost:3000/

How it looks

The example renders the table on the browser, and should look something similar to this:

table

About

A straightfoward example of how you can use <View>, <Text> and CSS to build a table inside @react-pdf (Since it's not implemented 💁).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published