@kishannareshpal/expo-pdf 0.3.0 โ†’ 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,23 @@
13
13
  _This version does not introduce any user-facing changes._
14
14
  -->
15
15
 
16
+ ## 0.3.2 - 2026-03-24
17
+
18
+
19
+ **Full Changelog**: https://github.com/kishannareshpal/expo-pdf/compare/v0.3.1...v0.3.2
20
+
21
+
22
+ ## 0.3.1 - 2026-02-03
23
+
24
+
25
+ ### ๐Ÿ› Bug Fixes
26
+
27
+ - fix: android 7 rendering ([0edf556](https://github.com/kishannareshpal/expo-pdf/commit/0edf556b266e26205416d1cdb1e6b86c9f924e71)) by `Kishan Jadav`
28
+
29
+
30
+ **Full Changelog**: https://github.com/kishannareshpal/expo-pdf/compare/v0.3.0...v0.3.1
31
+
32
+
16
33
  ## 0.3.0 - 2026-02-03
17
34
 
18
35
 
@@ -47,9 +47,9 @@ dependencies {
47
47
  // more updates coming from that repo.
48
48
  // - com.github.kishannareshpal:AndroidPdfViewer repo is based on PdfiumAndroidKt, a much newer
49
49
  // fork of PdfiumAndroid, with better maintenance and updated native libraries.
50
- implementation 'com.github.kishannareshpal:AndroidPdfViewer:2026.01.07.2'
50
+ implementation 'com.github.kishannareshpal:AndroidPdfViewer:2026.02.03.1'
51
51
 
52
52
  // Explicitly define the version of PdfiumAndroidKt so this can be updated independently of
53
53
  // AndroidPdfViewer as updates are provided.
54
- implementation 'io.legere:pdfiumandroid:1.0.35'
54
+ implementation 'io.legere:pdfiumandroid:1.0.32'
55
55
  }
@@ -166,13 +166,6 @@ class KJExpoPdfView(context: Context, appContext: AppContext) : ExpoView(context
166
166
  )
167
167
  )
168
168
  }
169
- .onLoad {
170
- this.onLoadComplete(
171
- mapOf(
172
- "pageCount" to this.pdfView.pageCount
173
- )
174
- );
175
- }
176
169
  .onPageChange { pageIndex, pageCount ->
177
170
  this.onPageChanged(
178
171
  mapOf(
@@ -215,7 +208,7 @@ class KJExpoPdfView(context: Context, appContext: AppContext) : ExpoView(context
215
208
  override fun onAttachedToWindow() {
216
209
  super.onAttachedToWindow()
217
210
 
218
- this.pdfView.isRecycled.let {
211
+ if (!this.pdfView.isRecycled) {
219
212
  this.reloadPdf()
220
213
  }
221
214
  }
@@ -208,6 +208,18 @@ class KJExpoPdfView: ExpoView {
208
208
  ])
209
209
  }
210
210
 
211
+ @objc private func handleDocumentChanged() {
212
+ guard
213
+ let document = pdfView.document
214
+ else { return }
215
+
216
+ DispatchQueue.main.async {
217
+ self.onLoadComplete([
218
+ "pageCount": document.pageCount
219
+ ])
220
+ }
221
+ }
222
+
211
223
  private func reloadPdf() {
212
224
  guard let document = self.loadDocument() else {
213
225
  return
@@ -233,9 +245,6 @@ class KJExpoPdfView: ExpoView {
233
245
 
234
246
  self.autoScale(resetScrollOffset: !self.isFirstLayoutComplete)
235
247
 
236
- self.onLoadComplete([
237
- "pageCount": document.pageCount
238
- ])
239
248
  }
240
249
 
241
250
  private func loadDocument() -> PDFDocument? {
@@ -280,6 +289,13 @@ class KJExpoPdfView: ExpoView {
280
289
  name: .PDFViewPageChanged,
281
290
  object: pdfView
282
291
  )
292
+
293
+ NotificationCenter.default.addObserver(
294
+ self,
295
+ selector: #selector(handleDocumentChanged),
296
+ name: .PDFViewDocumentChanged,
297
+ object: pdfView
298
+ )
283
299
  }
284
300
 
285
301
  private func reportError(_ code: ErrorCode, _ message: String) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kishannareshpal/expo-pdf",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "author": "Kishan Jadav <kishan_jadav@hotmail.com> (https://github.com/kishannareshpal)",
5
5
  "repository": "https://github.com/kishannareshpal/expo-pdf",
6
6
  "main": "build/index.js",
package/release_body.txt CHANGED
@@ -1,17 +1,2 @@
1
1
 
2
- ### โœจ Features
3
-
4
- - feat: support color inversion on ios and android ([8951a5c](https://github.com/kishannareshpal/expo-pdf/commit/8951a5c4162e863cb00f21959afe66509a66890d)) by `Kishan Jadav @ mozexames`
5
-
6
-
7
- ### ๐Ÿ“š Documentation
8
-
9
- - docs: color inversion ([bb4ed8f](https://github.com/kishannareshpal/expo-pdf/commit/bb4ed8f527a3201a555da62446e4e33831546e75)) by `Kishan Jadav`
10
-
11
-
12
- ### ๐Ÿงน Chores
13
-
14
- - chore: add color inversion example ([9c90bae](https://github.com/kishannareshpal/expo-pdf/commit/9c90bae266ca489dfb4cb89bf5b9a3d5ce838e2e)) by `Kishan Jadav`
15
-
16
-
17
- **Full Changelog**: https://github.com/kishannareshpal/expo-pdf/compare/v0.2.6...v0.3.0
2
+ **Full Changelog**: https://github.com/kishannareshpal/expo-pdf/compare/v0.3.1...v0.3.2