dealfonso / sapp

Simple and Agnostic PDF Document Parser in PHP - sign PDF docs using PHP
GNU Lesser General Public License v3.0
121 stars 32 forks source link

Fix page count check #63

Closed mikocevar closed 7 months ago

mikocevar commented 9 months ago

Parameter $page_to_appear is zero based. The get_page_count method returns the number of pages starting with 1. The if statement does not trigger an error if 1 is provided on a document with 1 page. Reducing the count by 1 solves the issue.