Extract Annotations: PDF-Text not extracted when highlighted with other PDF Tool

Aperta
#758 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Start by reproducing the issue with the attached ebook.pdf and the annotation extraction path, then compare the programmatic output with the EmbedPDF Viewer right sidebar. Check how highlights created by other PDF viewers are represented and extracted. Done means their highlighted text appears both in extracted results and in the sidebar, while existing EmbedPDF highlights continue to work.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi There,
first and foremost: I want to thank you for this great application!! Some appreciation for your hard work :)

I am unfortunately facing an Issue:
When opening a PDF that contains highlights/annotations from other PDF Viewers, the highlighted text is not available when using "extract annotations". Neither programmatically extracting, nor in the EmbedPDF Viewer right sidebar. It recognizes that there is an annotation, and when i "comment" on the highlight, the "comment" text is displayed, but not the highlighted text itself.

When Opening up the Document e.g. in GNOME Document Viewer or Zotero, that PDF Viewer extracts the highlighted text as expected.

Here i attached an Example PDF with Hightlights on the first Page. First Highlight is made with EmbedPDF which is fine, but the two other Hightlights are mare with 2 different other Programs.
ebook.pdf

Some Hint would be much appreciated <3

This is what EmbedPDF extracts:

[
    {
        "annotation": {
            "pageIndex": 0,
            "id": "462e4b22-3fe1-4ec6-9269-bb78194a42dc",
            "type": 9,
            "rect": {
                "origin": {
                    "x": 105.99609375,
                    "y": 507.4921875
                },
                "size": {
                    "width": 157.65841674804688,
                    "height": 51.18751525878906
                }
            },
            "segmentRects": [
                {
                    "origin": {
                        "x": 105.99609375,
                        "y": 507.4921875
                    },
                    "size": {
                        "width": 157.65841674804688,
                        "height": 51.18751525878906
                    }
                }
            ],
            "strokeColor": "#f5c211",
            "color": "#f5c211",
            "opacity": 1,
            "author": "Guest",
            "contents": "",
            "modified": "2026-08-15T13:14:02.000Z",
            "flags": [],
            "blendMode": 1
        }
    },
    {
        "annotation": {
            "pageIndex": 0,
            "id": "bec541a4-ab6b-44f5-a8a5-6d57e493af28",
            "type": 16,
            "rect": {
                "origin": {
                    "x": 613,
                    "y": 384.5159912109375
                },
                "size": {
                    "width": 180,
                    "height": 100
                }
            },
            "contents": "",
            "flags": [],
            "blendMode": 0
        }
    },
    {
        "annotation": {
            "pageIndex": 0,
            "id": "418c9b9d-fb59-4a62-82f2-1a958315cdc7",
            "type": 9,
            "rect": {
                "origin": {
                    "x": 105.3251953125,
                    "y": 384.5159912109375
                },
                "size": {
                    "width": 343.3320007324219,
                    "height": 107.6328125
                }
            },
            "segmentRects": [
                {
                    "origin": {
                        "x": 105.98999786376953,
                        "y": 385.33001708984375
                    },
                    "size": {
                        "width": 342.01998138427734,
                        "height": 37.920013427734375
                    }
                },
                {
                    "origin": {
                        "x": 105.98999786376953,
                        "y": 424.3500061035156
                    },
                    "size": {
                        "width": 305.90001678466797,
                        "height": 28.000030517578125
                    }
                },
                {
                    "origin": {
                        "x": 105.98999786376953,
                        "y": 419.3899841308594
                    },
                    "size": {
                        "width": 305.90001678466797,
                        "height": 37.920013427734375
                    }
                },
                {
                    "origin": {
                        "x": 105.98999786376953,
                        "y": 453.3699951171875
                    },
                    "size": {
                        "width": 124.60999298095703,
                        "height": 37.920013427734375
                    }
                }
            ],
            "strokeColor": "#ffff98",
            "color": "#ffff98",
            "opacity": 1,
            "contents": "hell yeah",
            "created": "2026-08-15T10:48:17.000Z",
            "flags": [
                "print"
            ],
            "blendMode": 1,
            "appearanceModes": 1
        }
    },
    {
        "annotation": {
            "pageIndex": 0,
            "id": "8cacd469-5f1e-4f87-b519-2852aacb7ab1",
            "type": 9,
            "rect": {
                "origin": {
                    "x": 106,
                    "y": 221
                },
                "size": {
                    "width": 378,
                    "height": 141
                }
            },
            "segmentRects": [
                {
                    "origin": {
                        "x": 106,
                        "y": 221
                    },
                    "size": {
                        "width": 354,
                        "height": 45
                    }
                },
                {
                    "origin": {
                        "x": 106,
                        "y": 269
                    },
                    "size": {
                        "width": 378,
                        "height": 45
                    }
                },
                {
                    "origin": {
                        "x": 106,
                        "y": 317
                    },
                    "size": {
                        "width": 220,
                        "height": 45
                    }
                }
            ],
            "strokeColor": "#ffcd45",
            "color": "#ffcd45",
            "opacity": 1,
            "author": "Guest",
            "contents": "",
            "created": "2026-08-15T10:45:04.000Z",
            "flags": [
                "print"
            ],
            "custom": {
                "text": "PDF Viewers Are a\r\nPain But they Don’t\r\nHave to Be)"
            },
            "blendMode": 1,
            "appearanceModes": 1
        }
    }
]
Lingua principale
TypeScript
Stelle
4.5k
Fork
317
Merge medio
10h 16m
PR unite (30g)
174

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di embedpdf/embed-pdf-viewer

Tutte le issue di embedpdf/embed-pdf-viewer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.