Skip to main content
Participant
December 4, 2020
Question

Adding annotations via addAnnotations() is slow

  • December 4, 2020
  • 2 replies
  • 832 views

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.

This topic has been closed for replies.

2 replies

Participating Frequently
February 21, 2022

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?

Joel Geraci
Community Expert
Community Expert
February 28, 2022

Can yo share your code?

Joel Geraci
Community Expert
Community Expert
December 7, 2020

Can you share your annotation JSON objects?

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

 

Clayton.GAuthor
Participant
December 8, 2020

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.