Just a guess here...
Have you tried to download the PDF using the $mech connection you are already using? Say using:
$mech->save_content( $filename );
Maybe this is a cookie issue. I believe that $mech will accept cookies by default. This might mean that using a separate mirror process causes a different connection to take place and the web server maybe does not allow a direct connection from that page without a cookie.
It might work for you in the browser since your browser would already have a cookie.