Question
Registercallback in Adobe DC View (SAVE_API)
Hi,
I've got an error message when I put a callback with SAVE_API type.
Error message:
ViewSDKInterface.js:1 Uncaught TypeError: Cannot read property 'then' of undefined
at CallbackService._handleCallbackMessage (ViewSDKInterface.js:1)
at ViewSDKInterface.js:1
at Array.forEach (<anonymous>)
at MessagingService._receiveMessageHelper (ViewSDKInterface.js:1)
My code:
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({
clientId: "<adobe_id>",
divId: "adobe-dc-view",
locale: "fr-FR",
});
adobeDCView.previewFile({
content:{
location: {url: "pdf/doc1.pdf"}
},
metaData:{fileName: "doc1.pdf"}
},
{
embedMode: "FULL_WINDOW",
defaultViewMode: "FIT_PAGE",
showDownloadPDF: true,
showPrintPDF: true,
showLeftHandPanel: false,
showAnnotationTools:true
});
const saveOptions = {
//
}
adobeDCView.registerCallback(
AdobeDC.View.Enum.CallbackType.SAVE_API,
function(metadata, content, options) {
console.log(content)
}
);
});
Anybody have an idea what's wrong?
Thanks
