Skip to content

Commit

Permalink
close #398 ExtractByOutline can produce output documents without any …
Browse files Browse the repository at this point in the history
…pages
  • Loading branch information
ediweissmann committed Apr 1, 2021
1 parent 16d44d0 commit f1fdc5a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ public OutlineExtractPageDestinations getExtractPageDestinations(int level, bool
// Eg: a payslip document where each page has a bookmark (xyz destination) that points to the page, bookmark text is employee name

endPage = includePageAfter ? after.page : after.page - 1;

// no empty documents
if(endPage < startPage) {
endPage = startPage;
}
// endPage = after.page;
break;
}
}

// handle first page quirk when includePageAfter is false
if (startPage == 1 && endPage == 0) {
endPage = 1;
}

destinations.add(startPage, title, endPage);
}
}
Expand Down

0 comments on commit f1fdc5a

Please sign in to comment.