v2.4.0
This release aligns the three cache strategies with their intended behavior and adds regression coverage around caching, rendering, and embedded-view lifecycle cleanup.
MAXIMIZE_PERFORMANCEnow clearly behaves as the high-retention mode:- reuses downloaded remote PDFs
- keeps page bitmaps in memory and on disk
- keeps prefetch enabled
MINIMIZE_CACHEnow behaves as a reduced-storage mode:- reuses the current remote PDF
- keeps page bitmaps in memory only
- disables disk page-bitmap caching
- retains only one document cache on disk
DISABLE_CACHEnow behaves as a transient mode:- does not reuse persistent remote files
- disables disk page-bitmap caching
- disables prefetch
- still keeps visible rendering correct
- Fixed incorrect remote cache retention and reuse behavior across cache strategies.
- Fixed
DISABLE_CACHEso transient remote sessions no longer interfere with or delete persistent cache from other strategies. - Fixed embedded
PdfRendererView.initWithUrl(...)cleanup so transient remote files are cleaned up on lifecycle destroy, not only inPdfViewerActivity. - Fixed stale disk page-bitmap artifacts when reopening the same document under a stricter cache strategy.
- Hardened render job and callback bookkeeping in
PdfRendererCorewith minSdk-21-safe logic.
- Added a dedicated internal
CachePolicylayer to centralize strategy behavior. - Added unit tests covering:
- cache policy mapping
- document retention rules
- transient cleanup behavior
- Added hermetic instrumentation coverage for:
- local PDF behavior under all three strategies
- remote PDF reuse vs non-reuse
- embedded
PdfRendererViewlifecycle cleanup - strategy downgrade behavior for stale disk bitmap cache
- Added a debug-only embedded host activity used to verify
PdfRendererViewcleanup outsidePdfViewerActivity.
- No public API breaking changes.
- Existing
CacheStrategyAPIs remain the same; behavior is now more consistent and predictable.
v2.3.8 | Bug fixes
- Create notify-resolved.yml by @afreakyelf in https://github.com/afreakyelf/Pdf-Viewer/pull/209
- Updated Jetpack Compose sample in Readme by @muazdev26 in https://github.com/afreakyelf/Pdf-Viewer/pull/211
- fix: reset page height to WRAP_CONTENT on ViewHolder rebind by @hrithikvish in https://github.com/afreakyelf/Pdf-Viewer/pull/242
- Fix: Use deprecated getParcelableExtra on API 33 to prevent NPE (#244) by @AntoineJaury in https://github.com/afreakyelf/Pdf-Viewer/pull/245
- feat: expose zoom methods and add Compose example with FABs by @HoussemHfaidh in https://github.com/afreakyelf/Pdf-Viewer/pull/246
- Fix NoClassDefFoundError for lifecycle-process Kotlin anonymous classes in Java consumer apps by @Copilot in https://github.com/afreakyelf/Pdf-Viewer/pull/248
- Fix cache key collision for same-named PDFs in different directories by @Copilot in https://github.com/afreakyelf/Pdf-Viewer/pull/249
- Fix PDF quality degradation on zoom by @Copilot in https://github.com/afreakyelf/Pdf-Viewer/pull/247
- Add scrollToNextPage() / scrollToPreviousPage() for within-page scroll-before-advance navigation by @Copilot in https://github.com/afreakyelf/Pdf-Viewer/pull/250
- @muazdev26 made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/211
- @hrithikvish made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/242
- @AntoineJaury made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/245
- @HoussemHfaidh made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/246
- @Copilot made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/248
Full Changelog: https://github.com/afreakyelf/Pdf-Viewer/compare/v2.3.7...v2.3.8
v2.3.7
- fix: Abnormal behavior of scrolling when zooming in #194 by @lng8212 in https://github.com/afreakyelf/Pdf-Viewer/pull/203
- Delete redundant PdfSource by @robertlinsener in https://github.com/afreakyelf/Pdf-Viewer/pull/208
- Fix: Add missing default implementation for
onPdfRenderStartin StatusCallBack by @mubashirpa in https://github.com/afreakyelf/Pdf-Viewer/pull/204 - https://github.com/afreakyelf/Pdf-Viewer/issues/205
- https://github.com/afreakyelf/Pdf-Viewer/issues/206
- https://github.com/afreakyelf/Pdf-Viewer/issues/207
- Zoom fix
- @lng8212 made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/203
- @robertlinsener made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/208
- @mubashirpa made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/204
Full Changelog: https://github.com/afreakyelf/Pdf-Viewer/compare/v2.3.6...v2.3.7
v2.3.5
Please use this: https://github.com/afreakyelf/Pdf-Viewer/releases/tag/v2.3.6
- Make cache identifier for local file more unique by @vitoksmile in https://github.com/afreakyelf/Pdf-Viewer/pull/195
- Fixed Coroutines memory leak by @vitoksmile in https://github.com/afreakyelf/Pdf-Viewer/pull/196
- Kotlin 2.1.20 & AGP 8.9.2 by @vitoksmile in https://github.com/afreakyelf/Pdf-Viewer/pull/198
- Clear cache dir by @vitoksmile in https://github.com/afreakyelf/Pdf-Viewer/pull/199
- @vitoksmile made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/195
Full Changelog: https://github.com/afreakyelf/Pdf-Viewer/compare/v2.3.4...v2.3.5
v2.3.4
- handle file can not be opened because of pdf contains password by @elharies in https://github.com/afreakyelf/Pdf-Viewer/pull/130
- adjust Composable function signature to make source mandatory by @wiryadev in https://github.com/afreakyelf/Pdf-Viewer/pull/135
- Fixed strict policy violations https://github.com/afreakyelf/Pdf-Viewer/issues/171
- https://github.com/afreakyelf/Pdf-Viewer/issues/191
- https://github.com/afreakyelf/Pdf-Viewer/issues/189
- @elharies made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/130
- @wiryadev made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/135
Full Changelog: https://github.com/afreakyelf/Pdf-Viewer/compare/v2.3.3...master
v2.3.3
- fix: ensure PdfRendererView always releases resources via onDetachedFromWindow by @Blejator90 in https://github.com/afreakyelf/Pdf-Viewer/pull/188
- updated README.md by adding min/complie sdk versions description by @khyzhun in https://github.com/afreakyelf/Pdf-Viewer/pull/185
- @Blejator90 made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/188
- @khyzhun made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/185
Full Changelog: https://github.com/afreakyelf/Pdf-Viewer/compare/v2.3.2...v2.3.3
v2.3.2
- Complete the fix for https://github.com/afreakyelf/Pdf-Viewer/issues/180 issue by updating the checks for the Android version by @lcazalbasu in https://github.com/afreakyelf/Pdf-Viewer/pull/183
- Fixed scroll bar jumping, Thanks @UltraDeep for pointing out the issue.
- Made some changes to zoomin/out recycler view, hopefully it works out well for everyone.
Thank you all!
- @lcazalbasu made their first contribution in https://github.com/afreakyelf/Pdf-Viewer/pull/183
Full Changelog: https://github.com/afreakyelf/Pdf-Viewer/compare/v2.3.0...v2.3.2