{"id":16367253,"url":"https://github.com/nyxcode/svelte-pdf-viewer","last_synced_at":"2025-10-26T07:30:41.564Z","repository":{"id":54363624,"uuid":"522043271","full_name":"NyxCode/svelte-pdf-viewer","owner":"NyxCode","description":"(experimental) PDF viewer for svelte","archived":false,"fork":false,"pushed_at":"2022-08-13T01:05:52.000Z","size":6172,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T11:53:23.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NyxCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-06T20:06:13.000Z","updated_at":"2023-05-16T15:07:00.000Z","dependencies_parsed_at":"2022-08-13T13:30:30.259Z","dependency_job_id":null,"html_url":"https://github.com/NyxCode/svelte-pdf-viewer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyxCode%2Fsvelte-pdf-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyxCode%2Fsvelte-pdf-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyxCode%2Fsvelte-pdf-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyxCode%2Fsvelte-pdf-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NyxCode","download_url":"https://codeload.github.com/NyxCode/svelte-pdf-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238284735,"owners_count":19446718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T02:49:12.675Z","updated_at":"2025-10-26T07:30:35.535Z","avatar_url":"https://github.com/NyxCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svelte-pdf-viewer\n\n\u003e :warning: very experimental - **here be dragons**\n\n## [demo](https://svelte-pdf-viewer.nyxcode.com/)\n\n## goals\n- [ ] Fast  \n  - [ ] Fast renders \n  - [ ] Smooth scrolling / zooming / panning\n  - [ ] Fast initial load\n    - [ ] SSR of PDFs\n- [ ] Embeddable\n  - [ ] Directly embed in a svelte app\n  - [ ] Using `\u003ciframe /\u003e`\n- [ ] Customizable\n  - [ ] themeable\n- [ ] Extensible\n  - [ ] Custom annotations\n  - [ ] Plug-and-play renderers\n\n## supported renderers\n- [x] **Pdfium** *(using WASM through [pdfium-render](https://github.com/ajrcarey/pdfium-render))*\n- [ ] **PDF.js**\n\n## supported browsers\n- [x] **Chrome**\n- [x] **Firefox**\n\n## why is it so slow?\n- [x] only render visible pages\n- [x] only render visible thumbnails\n- [ ] only render visible parts of pages when zooming\n- [x] pdfium: re-use bitmap buffer\n- [x] implement rendering queue to discard outdated requests\n- [x] pdfium: render asynchronous in a webworker\n- [ ] pdfium: pre-load pdfium\n- [x] preemptively render pages\n- [x] preemptively render thumbnails\n- [ ] preload PDF\n- [ ] progressively load aspect ratios of pages instead of all at once\n\n## todo\n- [ ] touch gestures\n- [ ] text layer\n- [ ] display title or filename\n- [ ] download\n- [x] loading animation/indicator\n- [ ] print\n- [ ] rotate\n- [ ] progress bar\n- [ ] document details\n- [ ] side-by-side view\n- [ ] full-screen / presentation mode\n- [ ] profiling\n- [ ] publish package\n- [ ] plug-and-play renderers\n- [ ] make extendable \n- [ ] annotations\n- [ ] streamline build [^1]\n- [ ] investigate render quality [^2]\n- [ ] re-render if device pixel ratio changes\n\n## bugs\n- [x] thumbnails sometimes render at the wrong size\n- [x] pages flicker on when zooming\n- [x] Pages look blurry on high-DPI devices\n\n\n[^1]:  Currently, getting the thing to build is a pain due to the emscripten-generated `pdfium-js.js` and `pdfium.wasm`.  \n  `pdfium.wasm` is duplicated, once in `src/lib/backend/` and once in `/static/assets` since vite seems to be fine with \n  the first one (in dev), but rollup needs the 2nd one (when building).  \n[^2]: Is the render quality as good as it could be? What causes the slight misalignment when zooming? Are there weird rounding errors?","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyxcode%2Fsvelte-pdf-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyxcode%2Fsvelte-pdf-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyxcode%2Fsvelte-pdf-viewer/lists"}