svelte-pdfjs
Advanced tools
Comparing version 0.4.0-rc.0 to 0.4.0
# svelte-pdfjs | ||
## 0.4.0 | ||
### Minor Changes | ||
- a9ef4d6: [breaking] make pdfjs-dist a peer dep, add setWorkerSrc | ||
## 0.4.0-rc.0 | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "svelte-pdfjs", | ||
"version": "0.4.0-rc.0", | ||
"version": "0.4.0", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=16.0.0" |
@@ -6,9 +6,10 @@ ## svelte-pdfjs | ||
## Usage | ||
See [src/routes/index.svelte](src/routes/index.svelte) | ||
See [src/routes/+page.svelte](src/routes/+page.svelte) | ||
[Demo](https://gtm-nayan.github.io/svelte-pdfjs) | ||
## SvelteKit | ||
## Custom worker source | ||
You can provide a custom worker URL using `setWorkerSrc`, see [src/routes/+layout.ts](src/routes/+layout.ts) | ||
It's compatible with SvelteKit, just import the component and use it in a `{#if browser}` you'll have to install pdfjs-dist as a dependency. | ||
## SSR | ||
For now this package cannot be used with SSR, contributions to improve in that area are more than welcome. Because of how pdfjs-dist is packaged, there is an eval which prevents bundlers from properly minifying whatever chunk it ends up in. To get around it, you can patch your installation of pdfjs-dist such that all instances of `_is_node.isNodeJs` are replaced with `false` since those parts aren't going to be used anyway. | ||
@@ -19,3 +20,2 @@ ## TODOs: | ||
- [x] SvelteKit compatibility | ||
- [ ] Think of a better name for the `zoomLevel` prop on `Page` | ||
- [ ] SVG renderer | ||
@@ -22,0 +22,0 @@ - [ ] Annotation layer |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17835