@kishannareshpal/expo-pdf 0.3.1 → 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,12 @@
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
+
16
22
  ## 0.3.1 - 2026-02-03
17
23
 
18
24
 
@@ -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.1",
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,7 +1,2 @@
1
1
 
2
- ### 🐛 Bug Fixes
3
-
4
- - fix: android 7 rendering ([0edf556](https://github.com/kishannareshpal/expo-pdf/commit/0edf556b266e26205416d1cdb1e6b86c9f924e71)) by `Kishan Jadav`
5
-
6
-
7
- **Full Changelog**: https://github.com/kishannareshpal/expo-pdf/compare/v0.3.0...v0.3.1
2
+ **Full Changelog**: https://github.com/kishannareshpal/expo-pdf/compare/v0.3.1...v0.3.2