Click here to Skip to main content
15,938,448 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

HTML
<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.

code
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900