file_exists()
function does not work that way. It does not take remote URLs.
This function is used to check the file that exists on the file system.
Check the manual here
Make use of cURL to accomplish this.
<?php
$ch = curl_init("https://www.google.co.in/images/srpr/logo4w.png"); //pass your pdf here
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
curl_exec($ch);
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($retcode==200)
{
echo "exists";
}
else
{
echo "not exists";
}
?>