You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a pdf page contains 'Sig' type widget annotations and those annotations have a signature as their fieldValue, the promise returned by page.getAnnotations() does not resolve.
// PDF without signature annotations works properly, use {data: pdfData} for a demonstrationvarloadingTask=pdfjsLib.getDocument({data: pdfDataSigned});loadingTask.promise.then(function(pdf){console.log('PDF loaded');// Fetch the first pagevarpageNumber=1;pdf.getPage(pageNumber).then(function(page){console.log('Page loaded');page.getAnnotations().then(function(annotations){// this is never executed if the page has signaturesconsole.log('annotations loaded');for(leti=0;i<annotations.length;i++){console.log(annotations[i].subtype);}},function(reason){// this also does not happen if the page has signatures// Annotations loading errorconsole.log(reason);});});},function(reason){// PDF loading errorconsole.error(reason);});
pdfDataSigned and pdfData are included in the fiddle as base64, which is too long to include here.
Fiddle demo (I recommend scrolling to the end of the javascript panel): https://jsfiddle.net/luk_lo/mq9nyadh/1/
This may be related to #8429 but the provided fix is not helpful as it will prevent signature annotations from being returned by getAnnotations.
This bug is probably caused by the large fieldValue of the AnnotationsWidget as setting this.fieldValue = true; after the line
When a pdf page contains 'Sig' type widget annotations and those annotations have a signature as their fieldValue, the promise returned by page.getAnnotations() does not resolve.
Attach (recommended) or Link to PDF file here:
PDF with 'normal' annotations: http://www.pdfill.com/example/pdf_commenting_new.pdf
PDF with signature annotation: https://blogs.adobe.com/security/SampleSignedPDFDocument.pdf
Steps to reproduce:
pdfDataSigned
andpdfData
are included in the fiddle as base64, which is too long to include here.Fiddle demo (I recommend scrolling to the end of the javascript panel):
https://jsfiddle.net/luk_lo/mq9nyadh/1/
This may be related to #8429 but the provided fix is not helpful as it will prevent signature annotations from being returned by getAnnotations.
This bug is probably caused by the large fieldValue of the AnnotationsWidget as setting
this.fieldValue = true;
after the linepdf.js/src/core/annotation.js
Line 618 in 2f4c7e0
The text was updated successfully, but these errors were encountered: