iOS Safari crash when opening PDF
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
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- angular, ios, typescript
- Ambito
- frontend
Direzione di ricerca
Reproduce first: run the reporter's demo repo (Sckoco/pdf-crash-demo) on iOS Safari with src/assets/sample.pdf and watch memory while the viewer initializes around EmbedPDF.init(). The workaround pins window.devicePixelRatio to 1.5, so trace where the render/tiling layer reads devicePixelRatio and how tiles are buffered for large images; the render plugin's tiling config is the other lead. Done means the document loads on iOS Safari at the default ratio without the page reloading.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
@embedpdf/snippet 2.14.3
@angular/* 19.2.18
iOS Safari only
Summary
When trying to load a PDF file containing a large image inside, the viewer initializes correctly, but while the document is loading, the page reloads/crashes and the document never finishes loading. This only happens on iOS Safari — I haven't been able to reproduce it on desktop browsers.
I've been able to reproduce this same behavior with the same document on the live demo on the EmbedPDF website (tested on iOS Safari), so it doesn't appear to be specific to my setup.
As mentioned on the "Render plugin" page of the documentation, I already tried reducing the tile size in the tiling config to lower memory usage, but this did not resolve the issue.
A public repo is available on my profile to reproduce this issue. A sample PDF is provided at src/assets/sample.pdf.
Workaround
Reduce the DevicePixelRatio right before calling EmbedPDF.init() method.
Object.defineProperty(window, 'devicePixelRatio', {
get: () => 1.5,
configurable: true
});
To avoid affecting anything else in the application, this is done only when this is running on an iOS device and on the destruction of the component, the devicePixelRatio is set back to its default value.
Demo
- 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