Check if your users are allowed to access a certain document, or whatever...

RewriteRule ^mydoc.pdf$ mydoc-pdf.php

<?php
    if ($myCondition) {
        // headers and stuff
        @readfile('mydoc.pdf');
    }
    else // ...
?>