Skip to content

Commit

Permalink
1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
espresso3389 committed Feb 19, 2025
1 parent fb1f729 commit 2127f42
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.6

- "Bleeding edge" Pdfium WASM support (disabled by default)

## 1.1.5

- Explicitly specify web support on pubspec.yaml
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Add this to your package's `pubspec.yaml` file and execute `flutter pub get`:

```yaml
dependencies:
pdfrx: ^1.1.5
pdfrx: ^1.1.6
```
### Note for Windows
Expand All @@ -62,6 +62,25 @@ dependencies:
The build process internally uses *symbolic links* and it requires Developer Mode to be enabled.
Without this, you may encounter errors [like this](https://github.com/espresso3389/pdfrx/issues/34).
### "Bleeding Edge" Pdfium WASM support on Web
pdfrx now supports "bleeding edge" Pdfium WASM support on Web.
This is still not production-ready, but you can try it by adding additional [pdfrx_wasm](https://pub.dartlang.org/packages/pdfrx_wasm) to your dependencies:
```yaml
dependencies:
pdfrx: ^1.1.6
pdfrx_wasm: ^1.1.6
```
And then, enable Pdfium WASM by adding the following line to somewhere that runs before calling any pdfrx functions:
```dart
Pdfrx.webRuntimeType = PdfrxWebRuntimeType.pdfiumWasm;
```

The plugin, `pdfrx_wasm`, is a satellite plugin for `pdfrx` that contains files required to run Pdfium WASM. Because the WASM binary/support files are relatively large (about 4MB), it is not included in the main `pdfrx` package and you need to add `pdfrx_wasm` to your dependencies.

## Open PDF File

[PdfViewer](https://pub.dev/documentation/pdfrx/latest/pdfrx/PdfViewer-class.html) supports following functions to open PDF file on specific medium:
Expand Down
9 changes: 1 addition & 8 deletions example/viewer/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,7 @@ packages:
path: "../.."
relative: true
source: path
version: "1.1.5"
pdfrx_wasm:
dependency: "direct main"
description:
path: "../../wasm/pdfrx_wasm"
relative: true
source: path
version: "1.1.5"
version: "1.1.6"
platform:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pdfrx
description: pdfrx is a rich and fast PDF viewer implementation built on the top of PDFium. The plugin supports Android, iOS, Windows, macOS, Linux, and Web.
version: 1.1.5
version: 1.1.6
homepage: https://github.com/espresso3389/pdfrx

environment:
Expand Down
2 changes: 1 addition & 1 deletion wasm/pdfrx_wasm/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pdfrx_wasm
description: This is a satellite plugin for pdfrx that allows you to use WASM version of Pdfium.
version: 1.1.5
version: 1.1.6
homepage: https://github.com/espresso3389/pdfrx

environment:
Expand Down

0 comments on commit 2127f42

Please sign in to comment.