Click here to Skip to main content
14,635,816 members
Rate this:
Please Sign up or sign in to vote.
See more:
Sir,

I have PDF,ppt and word files in database.

I will show this files in grid view with file name.
When i click the grid view row it will open new browser window without menu bar, address bar.
i want following requirement
1.the user can read the content only.User can't right click and user can't take screen shot also

how to achieve this
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

<html>
<head>
<title>Show PDF,WORD PPT in browser</title>
</head>
<body oncontextmenu="return false;">
<a href="https://docs.google.com/viewer?url=http://investor.google.com/pdf/2012Q2_google_earnings.pdf" target="_blank">click to open file in browser</a>
</body>
</html>



To disable right click you can use <body oncontextmenu="return false;">

You can use Google Viewer API to show pdf/doc in browser.

https://docs.google.com/viewer?url=paste your url here

e.g.
click to open file in browser

You need to create custom control to achieve everything what you have described.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100