summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pdf/qpdfdocument.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp
index 69dc6e9ad..3719938a2 100644
--- a/src/pdf/qpdfdocument.cpp
+++ b/src/pdf/qpdfdocument.cpp
@@ -211,8 +211,9 @@ void QPdfDocumentPrivate::load(QIODevice *newDevice, bool transferDeviceOwnershi
emit q->pageCountChanged(pageCount);
}
- // If it's a local file, and the first page is available, probably the whole document is available.
- if (checkPageComplete(0)) {
+ // If it's a local file, and the first couple of pages are available,
+ // probably the whole document is available.
+ if (checkPageComplete(0) && (pageCount < 2 || checkPageComplete(1))) {
setStatus(QPdfDocument::Ready);
} else {
updateLastError();