Correct download url

pdf_task_page was obtained using results data table ( data) and you should use task.pageNum variable.
Sorry but I couldn't test my solution.