Adding annotations via addAnnotations() is slow

New Here ,
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

83

Likes

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 Community Professional ,
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 

Likes

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

Copy link to clipboard

Copied

LATEST

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.

Likes

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