Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 927 Bytes

File metadata and controls

24 lines (14 loc) · 927 Bytes

React to PDF Monthly Statement

This example uses React and styled-components to generate a monthly statement 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

View this in a browser

You can also view this template in a browser if you'd like. From the root directory, start the web server:

yarn web:react

Then visit localhost:8086