justice40-tool icon indicating copy to clipboard operation
justice40-tool copied to clipboard

[SPIKE] CEJST reports functionality

Open KameronKerger opened this issue 2 years ago • 2 comments

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.

KameronKerger avatar Apr 29 '22 15:04 KameronKerger

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/

vim-usds avatar Jun 08 '22 17:06 vim-usds

Tried react-to-print = seems to error on forward.ref() error in the console.

vim-usds avatar Jun 16 '22 15:06 vim-usds