In this section we’ll cover how to generate reports from the data we collect in our database using the clj-pdf library. Then we’ll discuss how to serve the generated PDF to the browser using the appropriate response type.
Our application will have an employee table that will be populated with some sample data. We’ll use this data to create a couple of different PDF reports, and we’ll allow the users to select the type of report they wish to view. Let’s create a new application called reporting-example using the Luminus template.
|||lein new luminus reporting-example +postgres|
Now we open the project.clj file to add the clj-pdf dependency.
We also have to remember to update the ...