pdf-lib.js实现浏览器中打开pdf合同并签字签名效果代码
代码语言:html
所属分类:其他
代码描述:pdf-lib.js实现浏览器中打开pdf合同并签字签名效果代码
代码标签: pdf-lib.js 浏览器 打开 pdf 合同 签字 签名
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <iframe id="pdf" style="width: 100%; height:100vh;"></iframe> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/pdf-lib.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/fontkit.umd.min.js"></script> <script> let app = document.getElementById('app'); let pdf = document.getElementById('pdf'); let pngImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABCYAAADUCAYAAABAviI+AAAgAElEQVR4Xu3dT8h9+X0X8G/tX9roNC2CbpyGuihImQ4VW1BoZlFxUyaDgossJiPoxsUkQlcuknHhRnAyWzeT2VemAwqi2HEgLiLSaTYapGFaEYybplWrqaiRtzmfyZmb++fc557/53Xg4fn9ufec73l9v899znmf75/vazYCBAgQIECAAAECBAgQIECAwEIC37fQcR2WAAECBAgQIECAAAECBAgQINAEExoBAQIECBAgQIAAAQIECBAgsJiAYGIxegcmQIAAAQIECBAgQIAAAQIEBBPaAAECBAgQIECAAAECBAgQILCYgGBiMXoHJkCAAAECBAgQIECAAAECBAQT2gABAgQIECBAgAABAgQIECCwmIBgYjF6ByZAgAABAgQIECBAgAABAgQEE9oAAQIECBAgQIAAAQIECBAgsJiAYGIxegcmQIAAAQIECBAgQIAAAQIEBBPaAAECBAgQIECAAAECBAgQILCYgGBiMXoHJkCAAAECBAgQIECAAAECBAQT2gABAgQIECBAgAABAgQIECCwmIBgYjF6ByZAgAABAgQIECBAgAABAgQEE9oAAQIECBAgQIAAAQIECBAgsJiAYGIxegcmQIAAAQIECBAgQIAAAQIEBBPaAAECBAgQIECAAAECBAgQILCYgGBiMXoHJkCAAAECBAgQIECAAAECBAQT2gABAgQIECBAgAABAgQIECCwmIBgYjF6ByZAgAABAgQIECBAgAABAgQEE9oAAQIECBAgQIAAAQIECBAgsJiAYGIxegcmQIAAAQIECBAgQIAAAQIEBBPaAAECBAgQIECAAAECBAgQILCYgGBiMXoHJkCAAAECBAgQIECAAAECBAQT2gABAgQIECBAgAABAgQIECCwmIBgYjF6ByZAgAABAgQIECBAgAABAgQEE9oAAQIECBAgQIAAAQIECBAgsJiAYGIxegcmQIAAAQIECBAgQIAAAQIEBBPaAAECBAgQIECAAAECBAgQILCYgGBiMXoHJkCAAAECBAgQIECAAAECBAQT2gABAgQIECBAgAABAgQIECCwmIBgYjF6ByZAgAABAgQIECBAgAABAgQEE9oAAQIECBAgQIAAAQIECBAgsJiAYGIxegcmQIAAAQIECBAgQIAAAQIEBBPaAAECBAgQIECAAAECBAgQILCYgGBiMXoHJkCAAAECBAgQIECAAAECBAQT2gABAgQIECBAgAABAgQIECCwmIBgYjF6ByZAgAABAgQIECBAgAABAgQEE9oAAQIECBAgQIAAAQIECBAgsJiAYGIxegcmQIAAAQIECBAgQIAAAQIEBBPaAAECBAgQIECAAAECBAgQILCYgGBiMXoHJkCAAAECBAgQIECAAAECBAQT2gABAgQIECBAgAABAgQIECCwmIBgYjF6ByZAgAABAgQIECBAgAABAgQEE9oAAQIECBAgQIAAAQJ7FnixtfZTrbW3Wmu/v+cTdW4EtiogmNhqzSk3AQIECBAgQIAAAQKXBD7VWnu1tfZbrbXPdi96o/dncgQIrEhAMLGiylAUAgQIECBAgAABAgSeJPBLrbU/aK293b37x1tr+epvgokn0XoTgekFBBPTGzsCAQIECBAgQIAAAQLjC6RXRA3T+OTJ7hNSPNNae6e19qUupPh1QznGrwR7JDCGgGBiDEX7IECAAAECBAgQIEBgaoGf64KIfE8okfki+r0iEkb8q64QNXzjd6YulP0TIPC4gGDicUN7IECAAAECBAgQIEBgfIGEDi93E1cmaDgXRKRXRIZoJIBIKJE5JWwECGxMQDCxsQpTXAIECBAgQIAAAQI7FqheEZ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