本文只是将pdf文件顶部按钮隐藏, 右键依然可以打印下载,
禁止右键此链接https://blog.csdn.net/qq_42005284/article/details/100134298
代码如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.embedbox embed {
-webkit-transform: translate(30px, -50px);
transform: translate(30px, -50px);
width: 900px;
height: 100%;
}
</style>
</head>
<body>
<div class="embedbox" style="width: 900px;height: 500px; overflow: hidden;">
<embed src="pdf文件" type="">
</div>
</body>
</html>