Skip to content

Latest commit

 

History

History

react-pdf

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

React to PDF Invoice

This example uses React and styled-components to generate an invoice PDF via Anvil's HTML to PDF API. You can use this as a jumping off point to generate a PDF with your own custom React / styled-components code via.

To run it, yarn install at the root of this repo, then run:

ANVIL_API_TOKEN=your_token yarn generate-pdf:react && open ./generate-react.output.pdf

See the generate-pdf.js script, and components directory here for the code.

React to HTML to PDF