I have a running Rails application with extensive PDF generation based on PRAWN. Now I want to migrate the frontend to React and use the PDF generation in React components. How can I call these functions (format .pdf)? I use the react_on_rails gem.
You’ll want to create an API endpoint to create the PDF file.
Here’s an example: