How to export ~3 million PostgreSQL records to PDF in Spring Boot and provide downloadable link via notification?
06:52 05 Dec 2025

I need to export approximately 3 million rows from a PostgreSQL table using a Spring Boot REST API, and instead of returning the file directly in the response, I want to:

  1. Generate a PDF file containing the exported data

  2. Store the file (locally or cloud like S3)

  3. Send a notification with a download link

  4. When the user clicks the link, the PDF should open/download

java spring