Copy link to clipboard
Copied
This happens only with large files(over 80mb)
my config:
const customFlags = {
showToolbar: false,
showCommentsPanel: false,
downloadWithAnnotations: false,
showToolsOnTextSelection: true,
printWithAnnotations: false
};
Copy link to clipboard
Copied
Where do you see the commenting options? Please share screenshots and rest of the code snippet, if possible.
You can pass these custom flags to the setConfig annotation API OR annotationUIConfig object in previewFile API.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi again,
I just saw that i also get this error:
"Uncaught Error: APIs not allowed on this PDF"
What does this mean? I can't use your API on all pdf files?
Copy link to clipboard
Copied
I did a test with a large PDF and used the option, showAnnotationTools:fase, and it worked fine. Can you try that?
Copy link to clipboard
Copied
@Raymond Camden im having the same issue.
Setting showAnnotationTools:false solves it but it disables PDF annotations alltogether, I need a way to disable the comments sidebar.. There is no way for me to tell whether the PDF allows commenting or not, so when the config fails to apply due to PDF not allowing comments, it fails to disable the comments panel in the setconfig method looks like
Copy link to clipboard
Copied
I haven't been able to reproduce this issue. The file I'm using is 89MB.
Copy link to clipboard
Copied
Apparently, it does not relate to file size. I used an ebook file (sent it to isaac). https://drive.google.com/file/d/12Xp20xZKFIvS7SjeDS57lOTCwac_widN/view?usp=sharing
If you can't see it,please send me your email address or something.
Your app can't work with this pdf & I must know why.
Thank you
Copy link to clipboard
Copied
I've requested access to the file.
Copy link to clipboard
Copied
access granted 😉
Copy link to clipboard
Copied
Tested with our online demo (https://documentcloud.adobe.com/view-sdk-demo/index.html#/customize/FULL_WINDOW) and I still can't reproduce this with your document. I disabled annotation tools and do not see a way to add comments to the PDF. Did you try using showAnnotationTools:false?
Copy link to clipboard
Copied
In my project i use my own comments management using your API and when i try to create the annotation manager i get:
The fact that the comments bar apears is the least of my problems 😉
My main problem is that i want to set annotations with this file any when i try it i get this error:
"Uncaught Error: APIs not allowed on this PDF"
I can't share the whole code but it fails on the bold line when i try to set configuration:
createPdfViewer(){
const { filerr, withCollaboration } = this.props;
const { openUrl, open_url, fileName, id } = filerr;
this.clearViewerResources();
document.addEventListener('adobe_dc_view_sdk.ready', () => {
if (window.AdobeDC) {
this.setAdobeDCView();
registerViewerEvents(AdobeDC, this.adobeDCView, (event) => this.onViewerEvents(event));
createAdobeViewer(this.adobeDCView, openUrl || open_url, fileName, id).then((adobeViewer) => {
removeSaveButton(AdobeDC, this.adobeDCView);
adobeViewer.getAnnotationManager().then((annotationManager) => {
this.annotationMNGR = new AnnotationManager(annotationManager);
setConfig(annotationManager, { showToolsOnTextSelection: withCollaboration }).then(() => {// canCreateComments
this.toggleHideAnnotations();
registerAnnotationEvents(annotationManager, (event) => this.onAnnotationEvents(event));
}).catch((err) => Error.send(err.message, err.code, { failureLocation: 'PDF: Adobe embed sdk: setConfig failed' }));
}).catch((err) => Error.send(err.message, err.code, { failureLocation: 'PDF: Adobe embed sdk: getAnnotationManager failed' }));
}).catch((err) => Error.send(err.message, err.code, { failureLocation: 'PDF: Adobe embed sdk: previewFile failed' }));
}
});
}
What is so special about this file?
Copy link to clipboard
Copied
Maybe a video is better than a thousand words 😉
https://www.loom.com/share/568938e527f649dbb20a00afef4f6888
The above is the relevant file with your demo
Copy link to clipboard
Copied
The file is secured to prevent modification. What viewer experience are you trying to achieve exactly? I don't have the full code but I don't think you are actually setting the annotation manager config where you think you are.
Copy link to clipboard
Copied
Oh, OK. thank you.
Can i detect it in advance using your API? i want to let the user know befor i load the page.
Another thing: As you can see, after highlighting some text, the commnt bar apears in a closed state, can you guys fix it?
Copy link to clipboard
Copied
As a quick FYI, in the event handler for adobe_dc_view_sdk.ready, you do not need to check for window.AdobeDC. That's going to be defined when the event is fired.
Copy link to clipboard
Copied
OK, thank you.
say, considering the above. Any way i can check if the PDF is secured before i load it using your API? Or even after?
Copy link to clipboard
Copied
im having the same issue.
Setting showAnnotationTools:false solves it but it disables PDF annotations alltogether, I need a way to disable the comments sidebar.. There is no way for me to tell whether the PDF allows commenting or not, so when the config fails to apply due to PDF not allowing comments, it fails to disable the comments panel in the setconfig method looks like