Skip to main content

Migration to 6.0

6.0.0 is a breaking release.

High-impact changes​

  • Viewer component is PdfView.
  • Page indexing is 0-based across viewer and document APIs.
  • Downloads/caching moved to native PdfCache.
  • Errors are structured (PdfError with stable code).

Dependency updates​

Remove old dependency usage unless your app directly uses it:

npm uninstall react-native-blob-util @react-native-async-storage/async-storage crypto-js

Install required peer:

npm install react-native-pdf-jsi react-native-nitro-modules

Viewer migration map​

5.x / 4.x6.0
page (1-based)initialPage + goToPage (0-based)
scaleinitialScale + zoomTo
onLoadCompleteonLoad
onPageChangedonPageChange
highlightRects string recthighlights object rect

Password handling​

Use onPasswordRequired and pass password prop updates as needed.

Full details​

Canonical migration reference in source repo: