Feature request: thumbnails that reflect annotations — a `withAnnotations` option on the thumbnail plugin + annotation-commit `REFRESH_PAGES`
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Start with the thumbnail plugin’s renderThumb path and its configuration surface, then trace the annotation plugin’s commit path and the existing REFRESH_PAGES handling. Verify how withAnnotations and affected pages flow through the render calls and refresh machinery. Done means annotation-bearing thumbnails can be enabled without changing main-view rendering and refresh after annotation commits; use the reported Playwright probe to verify imported and committed ink.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
@embedpdf/[email protected]via jsDelivr (also what the@2tag resolves to today). Chunks read/probed:embedpdf-7TNsu-EA.js,worker-engine-BkD2-rJn.js.- Chromium 145 (headless via Playwright) — same behaviour in our production Chrome app.
The gap
Use-case: a document a user is annotating heavily — in our app, "note pages" the user fills with ink. The thumbnail rail rasterizes the served page only, so a page covered in ink is indistinguishable from a truly blank page in the rail. Native PDF apps (e.g. Adobe Acrobat) composite annotation appearance into their page previews, so users expect thumbs to live with their marks.
Two halves to the gap, both verified on 2.14.4:
-
Thumbnails never show annotations, and there is no knob to enable it. The engine already supports compositing: the
renderPage/renderPageRectoptions acceptwithAnnotations(andwithForms), defaultfalse— the worker maps it to theFPDF_ANNOTflag onFPDF_RenderPageBitmapWithMatrix. But the thumbnail plugin'srenderThumbpasses only{scaleFactor, dpr, rotation}, and the plugin's config surface (width / gap / buffer / labelHeight / autoScroll / …) has no annotations option — so there is no supported way to get annotation-bearing thumbs. -
Annotation commits never refresh thumbnails. The refresh machinery exists end-to-end — the
REFRESH_PAGEScore action makes the thumbnail plugin drop the affected pages from its per-page task cache and emitonRefreshPages, and the rail re-renders those pages — but only the redaction plugin dispatches it. The annotation plugin's commit path does not, so even annotation-bearing thumbs would go stale as the user edits.
We verified the render half works: passing withAnnotations: true on the thumb-sized render call composites both freshly-committed and imported ink correctly (PDFium generates appearance streams in-memory for rendering). So this looks like wiring, not engine work.
The ask
- A thumbnail-plugin config option (e.g.
withAnnotations: true) forwarded to its render calls. - Annotation commits dispatching
REFRESH_PAGESfor the affected pages (possibly gated on the same option).
Design note from probing
Flipping the render plugin's global config default is not a substitute: the main-view tiles share those defaults, and rasterized annotations would double-draw underneath the live DOM annotation layer. The per-plugin / per-call option is the right lever.
Happy to test a candidate implementation — we have a probe script for exactly this flag.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di embedpdf/embed-pdf-viewer
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
embedpdf/embed-pdf-viewer#1098 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
embedpdf/embed-pdf-viewer#921 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
embedpdf/embed-pdf-viewer#889 ·
I maintainer di solito rispondono entro 1 giorno
-
[v2] TaskQueue: equal-priority tasks can run out of order when a randomUUID id starts with digitsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
embedpdf/embed-pdf-viewer#874 ·
I maintainer di solito rispondono entro 1 giorno
-
Free text stays scrolled to the caret after editing endsForse già presa @chahore l’ha presa 36 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
embedpdf/embed-pdf-viewer#861 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di embedpdf/embed-pdf-viewer
Issue simili
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
lingdojo/kana-dojo#34223 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
mastra-ai/mastra#30587 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:web p2 product:business triage:active type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
cuadrao-ai/argus#2228 ·
I maintainer di solito rispondono entro 1 giorno
-
.Needs Triage .Team/Metabot Priority:P3 Type:Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
metabase/metabase#87252 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
NuGet registry builds every URL from ROOT_URL, ignoring the host the client usedForse già presa @gritse l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno