I am using FileResult to return a PDF.
My code works but is there a way to disallow users to download/print and click (copy the words) from the PDF?
This is my code that i am using. I am using a javascript code to call the code below.
const GetArticleTab = (obj) => {
window.open("@Url.Action("ReturnFile", "Product")?fileName=" + obj, '_blank', 'toolbar = 0, location = 0, menubar = 0');
};
public FileResult ReturnFile(string fileName) {
string str_URL = //location of the file
byte[] _byte = System.IO.File.ReadAllBytes(str_URL);
return File(_byte, "application/pdf");
}
What I want is display the PDF document for users to view but they are not allow to download/print/or copy the text as it is a sensitive document that is only available for paid users.