java.lang.RuntimeException: The page 1 was requested but the document has only 0 pages.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by csarathe
, 1 year ago
The page 1 was requested but the document has only 0 pages.
via Stack Overflow by My God
, 2 years ago
The page 1 was requested but the document has only 0 pages.
via Stack Overflow by Arun
, 1 year ago
The page 10 was requested but the document has only 1 pages.
java.lang.RuntimeException: The page 1 was requested but the document has only 0 pages.
at com.itextpdf.text.pdf.PdfWriter.close(PdfWriter.java:1260)
at com.itextpdf.text.pdf.PdfCopy.close(PdfCopy.java:1711)
at com.itextpdf.text.pdf.PdfDocument.close(PdfDocument.java:886)
at com.itextpdf.text.Document.close(Document.java:416)
at com.test.pdf.pro.file.business.impl.FileServiceTestImpl.concatPDFs(FileServiceTestImpl.java:6042)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.