Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/PDF UI/CPDFDocumentViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ - (UIViewController *)pageViewController:(UIPageViewController *)pageViewControl
CPDFPageViewController *theViewController = (CPDFPageViewController *)viewController;

NSUInteger theNextPageNumber = theViewController.page.pageNumber + 1;
if (theNextPageNumber > self.document.numberOfPages)
if (theNextPageNumber > self.document.numberOfPages || theViewController.page.pageNumber == 0)
{
//thealch3m1st: if we are in two page mode and the document has an even number of pages if it would just return NULL it woudln't flip to that last page so we have to return a an empty page for the (number of pages + 1)th page.
if(self.document.numberOfPages %2 == 0 &&
Expand Down