Answered
Events not dispatched for top-level annotations due to error
- March 12, 2021
- 1 reply
- 945 views
In the Adobe DC PDF View SDK, I'm experiencing an issue similar to this one in that top-level annotations of any kind will not be persisted. Commenting on particular parts of text will respond with that error, but no annotations besides replies will dispatch an ANNOTATION_ADDED event. ANNOTATION_COUNT does increase for text comments despite the error that displays.
I've isolated the failure - registering callbacks besides the following do not affect the presence of the error:
previewFilePromise.then((adobeViewer) => {
adobeViewer.getAnnotationManager().then((annotationManager) => {
annotationManager.registerEventListener(function (event) {
console.log(event.type, event.data)
}, eventOptions)
})
})
Here's the traceback, though it's cryptic due to the lack of sourcemaps:
Uncaught TypeError: t is undefined
_validateMinLength https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
_validatePropertySource https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
_validateProperty https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
_validateObjectForKeyList https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
_validateObjectForKeyList https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
_validateObject https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
_validatePropertyTarget https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
_validateProperty https://documentcloud.adobe.com/view-sdk/2.15.0_2.1.0-45e9ffb/AdobeDCViewApp.js:2
I've attached the PDF I'm using for the benefit of testing.
