There is really no way at all to do this. Due to the way the web works, the
browser has to download the file to view it. It can end up in the cache of
the user's computer, or the user could have tools that would suck the file
directly from the server (not hard to do actually). Even if you managed to
get around this all they have to do is take a screenshot of their desktop
and they can create their own file.
Usually the largest concern is for images, so your best bet is to put a
watermark over them if you want to ensure they can't be duplicated. For any
other document, it's basically the problem of if you want them to view it,
they can make copies of it somehow, some way.