Skip to content
Advertisement

iText PDF: the document has no pages

I’m trying to do a date range based filter to export a report into a PDF; however, when I click to export the PDF, I get the following message: ExceptionConverter: java.io.IOException: The document has no pages. Here’s my PDF class’ code:

And here’s the code of the PDF generation button:

I believe there’s a problem with SQL and JDateChooser, since its date format appears to be incompatible with SQL’s DATE format, but I’m not sure about it and I haven’t found any ways to change it, so, I’m here looking for help.

Advertisement

Answer

  1. It seems that your SQL request doesn’t return any row,

  2. Put your PdfTable(3) out of your while();

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement