Skip to content

Files

Latest commit

 

History

History
13 lines (8 loc) · 720 Bytes

File metadata and controls

13 lines (8 loc) · 720 Bytes

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