<?php // demo/temp_neil_bradley.php
/**
* https://www.experts-exchange.com/questions/29008867/Force-PDF-to-open-inline-as-opposed-to-dowload.html
*/
error_reporting(E_ALL);
$html = <<<EOD
<!DOCTYPE html>
<html>
<head>
<base href="http://beaconhilldesign.co.nz/~kevinmcdonald/" />
</head>
<body>
<p>
<a target="_blank" href="http://beaconhilldesign.co.nz/~kevinmcdonald/uploads/24/Buying_a_Houes.pdf/">24 Fully Qualified Link, Trailing slash, Opens _blank</a><br>
<a href="http://beaconhilldesign.co.nz/~kevinmcdonald/uploads/24/Buying_a_Houes.pdf">24 Fully Qualified Link, NO Trailing slash, Opens inLine</a><br>
<a href="http://beaconhilldesign.co.nz/~kevinmcdonald/uploads/files/Buy_%26_Sell_Property_-_IRD.pdf">files Fully Qualified Link, NO Trailing slash, Opens inLine</a><br>
<a target="_blank" href="uploads/files/Buy_%26_Sell_Property_-_IRD.pdf">files Relative Link, NO Trailing slash, Opens _blank</a><br>
<a href="uploads/files/Buy_%26_Sell_Property_-_IRD.pdf">files Relative Link, NO Trailing slash, Opens inLine</a><br>
</p>
</body>
</html>
EOD;
echo $html;
HTH, and best of luck with the project.
and a pdf plugin is installedImportant note! If you're going to require your clients to have a PDF plugin, you might want to tell them of the requirement. Or just don't worry about it because the file is getting sent correctly. In other words, you're already following the best practices, and any changes to the overall process need to be made on the client's end of things.
<IfModule mod_headers.c>
<FilesMatch "\.pdf$">
Header set Content-Disposition "attachment"
</FilesMatch>
</IfModule>
but if php toys with the headers as well i'm unsure which will win...
on apache 2.4 there may be a forcexxx directive that will override php's headers entirely ( the equivalent exists for filenames and mime types so disposition probably can be forced as well ) but i don't know which one without googling. anyway i'd try the above first.