• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[PDF Embed API] Comments option is enabled although i disabled it

Explorer ,
Aug 31, 2021 Aug 31, 2021

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
};

 

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 31, 2021 Aug 31, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2021 Aug 31, 2021

Copy link to clipboard

Copied

Please see attached. sharing the code is a bit impossible for me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2021 Sep 01, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 01, 2021 Sep 01, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 24, 2023 Oct 24, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 01, 2021 Sep 01, 2021

Copy link to clipboard

Copied

I haven't been able to reproduce this issue. The file I'm using is 89MB.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2021 Sep 01, 2021

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 01, 2021 Sep 01, 2021

Copy link to clipboard

Copied

I've requested access to the file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2021 Sep 01, 2021

Copy link to clipboard

Copied

access granted 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 02, 2021 Sep 02, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 02, 2021 Sep 02, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 02, 2021 Sep 02, 2021

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2021 Sep 02, 2021

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 02, 2021 Sep 02, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 02, 2021 Sep 02, 2021

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 02, 2021 Sep 02, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

LATEST

 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources