justice40-tool
justice40-tool copied to clipboard
[SPIKE] CEJST reports functionality
Is your feature request related to a problem? Please describe. It would be good if the CEJST could create reports - basically new pages that have the data with the ability to print and download the data. Download would be a new thing for the backend.
Describe the solution you'd like See kameron.
Describe alternatives you've considered The side panel is too smool.
Additional context See kameron.
Things that have been tried:
- jsPDF = fails to load
- react-pdf = works well to create a PDF from scratch but break i18n and have to create a bunch of duplicate logic as the entire HTML has to be re-created in DOM. Really great documentation
Need to try:
- https://www.freakyjolly.com/react-generate-download-pdf-from-html-page-example-react-to-print-tutorial/
- https://www.sitepoint.com/css-printer-friendly-pages/
new library to try:
- https://react-pdf-repl.vercel.app/
Found this article recently RE: Puppeteer
- https://blog.risingstack.com/pdf-from-html-node-js-puppeteer/
Tried react-to-print = seems to error on forward.ref() error in the console.