In this section we’ll cover how we can easily 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 allow the users to select the type of report they wish to view.
The first thing we’ll need to do is configure our database. For this example we’ll be using the PostgreSQL database.
Installing PostgreSQL is very easy. If you’re using OS X, then you can simply run Postgres.app. On Linux, you can install ...