pdf.js的一些常见处理
钢翼
编程
在使用viewer.html展示我们的pdf,当我们需要跨域时,需要找到viewer.js的以下代码,并注释掉
if (origin !== viewerOrigin && protocol !== 'blob:') {
throw new Error('file origin does not match viewer's');
}2.当我们需要显示电子签章的时候,我们需要找到pdf.worker.js的以下代码,并注释掉
if (data.fieldType === 'Sig') {
data.fieldValue = null;
_this3.setFlags(_util.AnnotationFlag.HIDDEN);
}