diff --git a/resources/qiye.html b/resources/qiye.html index f9b0d01..164c786 100644 --- a/resources/qiye.html +++ b/resources/qiye.html @@ -2241,6 +2241,23 @@ restoreBtn(); return; } + // 调试:确认截图是否全白/是否有内容 + try { + var ctx2d = canvas.getContext("2d"); + if (ctx2d) { + var p = ctx2d.getImageData(0, 0, 1, 1).data; + console.info( + "PDF截图信息", + { + w: canvas.width, + h: canvas.height, + firstPixel: Array.prototype.slice.call(p), + }, + ); + } + } catch (e) { + console.warn("读取截图像素失败(可能被跨域资源污染)", e); + } var imgData = canvas.toDataURL( "image/jpeg", 0.95,