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

Adding annotations via addAnnotations() is slow

Community Beginner ,
Dec 04, 2020 Dec 04, 2020

Copy link to clipboard

Copied

I'm adding dozens of highlight annotations to a PDF (with a single addAnnotations() call) using the PDF Embed API and it's surprisingly slow, taking on the order of 100 ms per annotation and leaving the viewer completely unresponsive for seconds at a time while they're added. This makes the viewer barely usable for my application; it'd be great if performance and responsiveness could be improved here. 

 

Incidentally, it'd be nice to be able to customize the appearance of highlight annotations more; the text bubble symbols aren't useful for what I'm doing, and the bodyValue text doesn't appear to be displayed anywhere so I'm having to do that myself.

TOPICS
PDF Embed API

Views

362

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 ,
Dec 07, 2020 Dec 07, 2020

Copy link to clipboard

Copied

Can you share your annotation JSON objects?

Also, the bodyValue will appear in the comments pane on the right if it's open.

Screen Shot 2020-12-07 at 8.22.00 AM.png 

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 Beginner ,
Dec 07, 2020 Dec 07, 2020

Copy link to clipboard

Copied

My annotation objects are like this one:

{
  "@context": [
    "https://www.w3.org/ns/anno.jsonld",
    "https://comments.acrobat.com/ns/anno.jsonld"
  ],
  "bodyValue": "",
  "created": "2020-02-21T14:45:37Z",
  "creator": {
    "name": "John Smith",
    "type": "Person"
  },
  "id": "95.1",
  "modified": "2020-02-21T07:54:10Z",
  "motivation": "commenting",
  "target": {
    "selector": {
      "boundingBox": [
        48.3621,
        250.83801,
        74.4323,
        258.80023
      ],
      "node": {
        "index": 1
      },
      "opacity": 0.3,
      "quadPoints": [
        48.3621,
        250.83801,
        74.4323,
        250.83801,
        74.4323,
        258.80023,
        48.3621,
        258.80023
      ],
      "strokeColor": "#53eb00",
      "strokeWidth": 3,
      "subtype": "highlight",
      "type": "AdobeAnnoSelector"
    },
    "source": "18715570"
  },
  "type": "Annotation"
}

 

I see them in the comment pane now. Unfortunately that's not really a good fit for my application so I've got it disabled; it'd be nice if it could show the content as a tooltip or something, or provide coordinates on ANNOTATION_MOUSE_OVER so I could draw my own.

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
New Here ,
Feb 21, 2022 Feb 21, 2022

Copy link to clipboard

Copied

Hi! I'm currently using Adobe Embed API as well and also having the problem of adding a lot of annotations with a single addAnnotationsInPdf() calll being very slow... Any updates on this issue?

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 ,
Feb 28, 2022 Feb 28, 2022

Copy link to clipboard

Copied

LATEST

Can yo share your code?

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