|
original poster
hbghlyj
posted 2023-5-26 19:01
pdf.js页面中不想要的部分用白色矩形填充覆盖:
(置高度h的白色矩形于页面下部)覆盖页码:
(置高度w的白色矩形于页面右部)覆盖分值:
- Array.prototype.forEach.call(document.getElementsByClassName('textLayer'),a=>a.remove());
- Array.prototype.forEach.call(document.getElementsByTagName('canvas'),canvas=>{
- ctx=canvas.getContext("2d");
- ctx.fillStyle = "white";h=100;
- ctx.fillRect(0, 1179-h, 834,h);
- w=86;
- ctx.fillRect(834-w, 0, 834,1179);
- });
Copy the Code 这样改动后只是显示的不一样, 但无法保存更改
去掉textLayer后右键canvas可以copy image |
|