check_request reimplemented to avoid the usage of pdftk