Copy link to clipboard
Copied
Hello,
I'm currently implementing the Embed API. Everything is working as expected but after the pdf is opened, the annotation toolbar disappears. During the loading proccess of the viewer you can see the toolbar, but after the document is opened it fully disappers.
Nonetheless some annotation tools appear on right click or text selection, the toolbar on the left hand side is just gone.
showAnnotationTools is set to true and the view is embedded in FULL_WINDOW mode, so it should be there normally.
I would be very thankful for any suggestions.
Copy link to clipboard
Copied
Can you share the PDF in question?
Copy link to clipboard
Copied
It happens for all PDFs I've tried so far (even in the Bodea Brochure from the code examples). So I don't think it has to do something with the file itself.
Copy link to clipboard
Copied
Interesting. I thought it might be because of security settings in the PDF. Can you share your code or link to the site? also, what device and browser are you seeing this on?
Copy link to clipboard
Copied
It is an angular / aspnet application. I've tried it in several browsers already (newest chrome, opera, edge) but the problem persists.
This is basically the .ts function for the view. I've commented everything else out (doc saving, events and so on) but it still won't work.
previewFileUsingFilePromise(divId: string, filePromise: Promise<string | ArrayBuffer>, fileName: string, fileID: string) {
const previewConfig = {
embedMode: 'FULL_WINDOW',
defaultViewMode: 'FIT_WIDTH',
includePDFAnnotations: true,
showAnnotationTools: true
}
this.adobeDCView = new window.AdobeDC.View({
clientId: 'xxx',
divId,
});
const view = this.adobeDCView.previewFile({
content: {
promise: filePromise,
},
metaData: {
id: fileID,
fileName: fileName
}
}, previewConfig);
return view;
}
This is the viewer during document loading for 1 second:
After the document is loaded:
But right clicking still shows some tools (and they are working):
Copy link to clipboard
Copied
If I use <script src="https://documentcloud.adobe.com/view-sdk/main.js"></script> instead of <script src='https://documentservices.adobe.com/view-sdk/viewer.js'></script> the tools are being displayed correctly.
Still I would prefer the UI of the viewer.js implementation...