Skip to content

Commit

Permalink
1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
espresso3389 committed Feb 19, 2025
1 parent f87b661 commit bf1daa6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.1.7

- Introducing allowDataOwnershipTransfer on PdfDocument.openData to allow transfer data ownership of the passed data; it is false by default to keep consistency with the previous behavior
- This actually fixes #303 but the drawback is that extra memory may be consumed on Flutter Web...

## 1.1.6

- "Bleeding edge" Pdfium WASM support (disabled by default)
Expand Down
4 changes: 2 additions & 2 deletions 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.6
pdfrx: ^1.1.7
```
### Note for Windows
Expand All @@ -69,7 +69,7 @@ This is still not production-ready, but you can try it by adding additional [pdf
```yaml
dependencies:
pdfrx: ^1.1.6
pdfrx: ^1.1.7
pdfrx_wasm: ^1.1.6
```
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.6"
pdfrx_wasm:
dependency: "direct main"
description:
path: "../../wasm/pdfrx_wasm"
relative: true
source: path
version: "1.1.6"
version: "1.1.7"
platform:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions example/viewer/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ dependencies:

pdfrx:
path: ../../
pdfrx_wasm:
path: ../../wasm/pdfrx_wasm/
# pdfrx_wasm:
# path: ../../wasm/pdfrx_wasm/

cupertino_icons: ^1.0.8
rxdart: ^0.28.0
Expand Down
5 changes: 5 additions & 0 deletions lib/src/pdf_document_ref.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,16 @@ class PdfDocumentRefFile extends PdfDocumentRef with PdfDocumentRefPasswordMixin
}

/// A [PdfDocumentRef] that loads the document from data.
///
/// For [allowDataOwnershipTransfer], see [PdfDocument.openData].
class PdfDocumentRefData extends PdfDocumentRef with PdfDocumentRefPasswordMixin {
const PdfDocumentRefData(
this.data, {
required this.sourceName,
this.passwordProvider,
this.firstAttemptByEmptyPassword = true,
super.autoDispose = true,
this.allowDataOwnershipTransfer = false,
this.onDispose,
});

Expand All @@ -223,6 +226,7 @@ class PdfDocumentRefData extends PdfDocumentRef with PdfDocumentRefPasswordMixin
final PdfPasswordProvider? passwordProvider;
@override
final bool firstAttemptByEmptyPassword;
final bool allowDataOwnershipTransfer;
final void Function()? onDispose;

@override
Expand All @@ -237,6 +241,7 @@ class PdfDocumentRefData extends PdfDocumentRef with PdfDocumentRefPasswordMixin
passwordProvider: passwordProvider,
firstAttemptByEmptyPassword: firstAttemptByEmptyPassword,
sourceName: sourceName,
allowDataOwnershipTransfer: allowDataOwnershipTransfer,
onDispose: onDispose,
);

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.6
version: 1.1.7
homepage: https://github.com/espresso3389/pdfrx

environment:
Expand Down

0 comments on commit bf1daa6

Please sign in to comment.