我正在使用 jsPdf 下载包含已打开窗口中某个部分的屏幕截图的 pdf。对于全屏模式,它工作正常。该项目可以通过手机访问,并且视图会改变,所以我想在全屏模式下捕获屏幕。
可能吗 ?
当前功能:
function Pdf() {
domtoimage.toPng(document.getElementById('pdfImg'))
.then(function (blob) {
var pdf = new jsPDF('l', 'pt', [$('#pdfImg').width(), $('#pdfImg').height()]);
pdf.addImage(blob, 'JPEG', 0, 0, $('#pdfImg').width(), $('#pdfImg').height());
pdf.save("Progress.pdf");
});
}