clamp used bbox to page dimension
Merge pull request #778 from chrox/bbox-fix

clamp used bbox to page dimension