Free Support Forum - groupdocs.com

Protected documents - Prevent download/HTML Inspect


#1

Hello!


I already saw that its possible to prevent user to download and print files with this configuration:

Viewer.ClienteCode()
.TargetElementSelector("#viewer")
.FilePath(this.Filename)
.UserHtmlBasedEngine(this.Mode)
.UserInnerThumbnails(false)
.OpenThumbnails(false)
.SupportPageRotation()
.DownloadPdfFileIfPossible(false)
.EnableRightClickMenu(false)
.ShowDownload(false)
.ShowPrint(false)
.UsePdfPrinting(false)

But if user inspect HTML code they can see the URL from document pages and open, save or print the document.

Is it possible to prevent user to do this? e.g: add a token on url that can be used only once per request, like anti forgery token

thank!

#2

Hello,


Thank you for your request. Unfortunately this is not possible because all Web technologies built on the HTTP requests, since that our library uses HTTP requests to get document content from the server and you can’t restrict users to view the queries in the browser console. The only thing that you can do is to use watermark on all your documents - then user will not be able to remove the watermark and the document will be “marked” with your copyright.

Best regards.