flutter_pdfview 1.5.0-beta.7
flutter_pdfview: ^1.5.0-beta.7 copied to clipboard
A Flutter plugin that provides a PDFView widget on Android and iOS.
1.5.0-beta.7 #
- Improve Android/iOS render quality defaults for #158
(#357):
density-aware page-part cache, apply Dart’s
thumbnailRatio0.8 when the param is omitted (AndroidPdfViewer’s static default is 0.3), keepuseBestQuality/enableAntialiasing/enableRenderDuringScaletrue when params are missing, pin iOScontentScaleFactorto the screen scale, and document quality knobs + hard Pdfium limits in the README - Includes everything in
1.5.0-beta.6
1.5.0-beta.6 #
- Fix #175:
getScreenshotno longer returns a white image under hybrid composition. Android captures viaPixelCopy(with a software-layerView.drawfallback); iOS rasterizes the PDFKit layer and falls back to drawing the currentPDFPage(drawing-cache / hierarchy snapshots are avoided on both platforms) (#356) - Includes everything in
1.5.0-beta.5
1.5.0-beta.5 #
- Fix load flash / first-layout size / iOS blank open (#355):
- #40: keep the native view hidden until the first successful render/fit so transitions do not flash an empty or mid-load surface
- #127: harden first layout fit — defer document open until a non-zero size, re-fit when the platform view settles after the first paint
- #190: iOS defers
PDFDocumentopen until usable bounds, reports missing/unreadable/corrupt/empty documents viaonError, and forces a layout pass after attach so the PDF is not stuck blank until background/foreground
- Includes everything in
1.5.0-beta.4
1.5.0-beta.4 #
1.5.0-beta.3 #
1.5.0-beta.2 #
1.5.0-beta.1 #
Native language migration on both platforms. Includes everything in 1.4.5.
- Android: migrate the plugin implementation from Java to Kotlin (KGP 2.0.0, JVM target 17). Behavior verified by the existing 64-test native suite running against the Kotlin sources unchanged
- iOS: migrate the plugin implementation from Objective-C to Swift 5.9. The registered
FLTPDFViewFlutterPluginclass name is preserved,NSExceptionguards around PDFKit are kept via a small Objective-C shim target, and scroll observation moved to block-based KVO. Verified on both Swift Package Manager and CocoaPods (pod lib lint, dynamic + static) - Fix a platform-view remount race: late creation callbacks from a disposed or remounted view can no longer complete the new controller with a stale instance
- Harden iOS
setZoomLimitsand align the podspecswift_version - No public Dart API changes
1.4.5 #
Stable release of the 1.4.5-beta.1 → 1.4.5-beta.5 line; no code changes since 1.4.5-beta.5.
Highlights since 1.4.4 (see the beta sections below for the full list):
- BREAKING: minimum Flutter 3.32.0 / Dart 3.8.0
- BREAKING: Android platform views now use true hybrid composition (
initExpensiveAndroidView) — fixes surface lock #263,EGL_NO_DISPLAYcrash #280, blanking on rotation #9 / dialogs #182 / load #298, and GPU glitches #306 - BREAKING: Android external PDF links only auto-launch
http/https; other schemes are reported throughonLinkHandlerinstead - iOS:
fitPolicy(WIDTH / HEIGHT / BOTH) implemented for Android parity, page fit decoupled fromautoSpacing#150,onErroron bad passwords/documents #211, white background and continuous scrolling #204, Privacy Manifest #271 - Android: Java 17 toolchain #334, dispose/memory-leak fixes #261, absolute-path loading #266,
libc++_shared.sopackaging #287 - New API:
minZoom/maxZoom#296,showScrollIndicators#337,onLoadComplete/onDraw,getCurrentPageSize(),getScreenshot(),getPosition()/setPosition(),getScale()/setScale(),reload(),setZoomLimits()#333 - Document remount when
filePath/pdfDatachanges #181
Migration from 1.4.4 #
- Raise your app to Flutter ≥ 3.32 and Dart ≥ 3.8.
- Android PDF views now use expensive hybrid composition (true platform views); re-check layout and gesture behavior if you embed
PDFViewin complex widget trees. - Non-
http(s)PDF links no longer auto-open — handle them yourself inonLinkHandler.
1.4.5-beta.5 #
- Fix #150: iOS initial page fit no longer depends on
autoSpacing(spacing vs zoom decoupled); re-fit after placeholder→real bounds and on rotation while preserving user zoom - Implement
fitPolicy(WIDTH / HEIGHT / BOTH) on iOS for parity with Android (iOS previously ignored the flag and always auto-fit the full page; defaultFitPolicy.WIDTHnow matches Android) - Add regression tests for #150 creation-param independence (Dart iOS/Android + Android Robolectric) and iOS fit-scale formula oracle
- Make standalone Android unit tests runnable:
compileOnlyFlutter embedding jar, fixandroid/settings.gradle, addscripts/run_android_unit_tests.sh
1.4.5-beta.4 #
- BREAKING: Raise minimum Flutter version to 3.32.0 and Dart SDK to 3.8.0 (aligns with
flutter_lints6 andformatter.page_width) - Android: switch platform views from texture hybrid composition (
initSurfaceAndroidView) to true hybrid composition (initExpensiveAndroidView) — fixesSurface was already locked!#263,EGL_NO_DISPLAYquick-open crash #280, blank on rotation #9, blank after dialogs #182, blank on load #298, and GPU glitches #306 - Fix Android layout direction to follow ambient
Directionality(was hardcoded RTL) - Fix #181: remount platform view when
filePath/pdfDatachanges so a new PDF can load - Fix #261: release Pdfium/PDFKit resources on dispose (Android recycle race + iOS observers/document/channel)
- Restrict Android external PDF link auto-launch to
http/https(avoidsfile://crashes and unsafe schemes); still reports all schemes viaonLinkHandler - Serialize concurrent
setPosition/setScalethrough a queue for any number of overlapping callers; null platform replies returnfalse - Compare
pdfDatavia cached digests instead of a full per-byte scan on every rebuild - Fix #268: avoid NaN CoreGraphics errors by initializing iOS
PDFViewwith a non-zero frame - Fix #204: iOS white background (not grey) and continuous vertical page scroll parity with Android
- Fix #266: load absolute filesystem paths via
fromFileon Android (No content provider) - Fix #287:
pickFirstpackaging forlibc++_shared.sonative merge conflicts - Defer Android PDF load until the view has non-zero size; safer dispose before surface draw races
- Propagate
nightModesetting updates to native Android view - Document
EagerGestureRecognizerfor PDFView inside scrollables #265 - Fix Android external PDF links silently failing on API 30+ package visibility (
resolveActivitypre-check) - Fix controller deadlock: a failed
setPosition/setScalecall permanently hung all later position/scale calls - Fix iOS silently showing a blank view for wrong/missing passwords — now fires
onError(parity with Android) - Fix iOS
getCurrentPage/onPageChangedreporting a garbage index (NSNotFound) before a page is loaded - Validate
thumbnailRatioto (0, 1] (Dart assert + Android clamp) — out-of-range values crashed rendering - Restructure Dart library into
lib/src/part files; public API unchanged - Adopt
flutter_lints6.0 with zero analyzer issues; dartdoc for the entire public API - Expand unit tests: controller method channel, native→Dart callbacks, document remount, creation settings
- Add 64 Android native unit tests (Robolectric/JUnit): URI handling, param parsing, link handler, thumbnail clamp
- Replace broken example widget test with home-screen / PDFScreen chrome coverage
- Fix Android
setPageresolving before the jump executes; reload pages whennightModechanges; handle unescapedfile:URIs on iOS
1.4.5-beta.3 #
- Fixed issue #337: Added showScrollIndicators option to control native scroll indicator visibility.
1.4.5-beta.2 #
- Fix iOS PDF view reporting not ready when it is on initial load
- Add
minZoomandmaxZoomto the README.md - Fix Android memory leak by recycling
PDFViewon dispose
1.4.5-beta.1 #
- Upgrade Java source/target compatibility from 1.8 to 17 #334
- Add iOS Privacy Manifest (PrivacyInfo.xcprivacy) #271
- Fix iOS
onErrorcallback not firing for invalid documents #211 - Fix iOS
onPageChangednot triggered on first load #66 - Fix iOS landscape PDF wrong initial zoom by preserving user-configured max scale factor #247
- Add configurable
maxZoomandminZoomparameters #296 - BREAKING: Raise minimum Flutter version to 3.27.0 and Dart SDK to 3.6.0
- Migrate
backgroundColorserialization from deprecatedColor.valuetoColor.toARGB32() - Update iOS deployment target to 13.0 in podspec and Package.swift (aligns with Flutter's own iOS 13.0+ requirement)
- Fix example app build error with undefined
nightModeBackgroundColorparameter - Add
onLoadCompletecallback triggered when the PDFView has loaded its document #333 @JaseElder - Add
onDrawcallback triggered on each draw within the PDFView #333 @JaseElder - Add
getCurrentPageSize()controller method returning width and height of the loaded page #333 @JaseElder - Add
getScreenshot(String fileName)controller method to save a PNG of the PDFView contents #333 @JaseElder - Add
getPosition()andsetPosition(Offset position)controller methods for the PDF top-left offset #333 @JaseElder - Add
getScale()andsetScale(double scale)controller methods for PDF zoom #333 @JaseElder - Add
reload()controller method to reload the PDF document #333 @JaseElder - Add
setZoomLimits(double minZoom, double midZoom, double maxZoom)controller method #333 @JaseElder - Add safe unboxing and completers for get/set viewport position to avoid contention and race conditions #333 @JaseElder
- Upgrade AndroidPdfViewer to 3.2.8 #333 @JaseElder
- Fix deprecated color
.valueusage #333 @JaseElder
1.4.3 #
- Stable Android 16KB page size support
- Fix iPad scroll direction crash issue #325
- Add defensive scroll view configuration for iPad devices
- Implement gesture conflict resolution to prevent "Failed to determine navigation direction for scroll" errors
- Add safe layout updates during scrolling animations
- Use more conservative scroll settings on iPad to improve compatibility
- Add iPad Safe Mode example in demo app for recommended PDF configurations on iPad
1.4.2-beta.1 #
- Add Android 16KB page size support #321 @opsenes
- Update Android PDF viewer library to
io.github.oothp:android-pdf-viewer:3.2.0-beta05 - Upgrade Android Gradle Plugin to 8.11.1
- Upgrade Gradle wrapper to 8.14.3
- Enable AndroidX support
1.4.1+1 #
- Revert
.toARGB32()to depricated.value
1.4.0+1 #
- Add error handling on background color in iOS
1.4.0 #
- Add support for Swift Package Manager
1.3.3 #
- hotfix: Crash on iOS 18
1.3.1 #
- Upgrade compileSdkVersion to 33
- Upgrade sdk
1.3.0 #
- Upgrade android-pdf-viewer to beta.3
1.2.9 #
- Deprecate
fitEachPage
1.2.8 #
- Add documentation on properties
1.2.7 #
- Downgrade android-pdf-viewer from beta.3 to beta.2
- Upgrade Gradle to 7.3.0
1.2.1 #
- Updated dependencies to be newest with latest flutter version.
- Update minimal version of flutter to 2.2.0
- Updated compileSdkVersion in Android gradle to 30 because in future new apps on Google Play will have to set at least compile version to 30
- Updated README #148 @PcolBP
1.0.3+1 #
- Format lib/flutter_pdfview.dart
1.0.2 #
- pod_target_xcconfig suggested by @zhenpeng0hou
1.0.1 #
- Add support on FitPolicy on android
1.0.0+12 #
- FIX: plugin class name
1.0.0+11 #
- add defaultPage option
1.0.0+9 #
- Avoid Android Native crash when file is not valid
1.0.0+7 #
- upgrade path_provider version
1.0.0+6 #
- FIX: onRender not works in iOS
1.0.0+5 #
- onRender handlers added
- onError, onPageError handlers added (Android only)
- Add example snippet in readme
1.0.0+4 #
- Add controller functions description in document
1.0.0+3 #
- Support
enableSwipein iOS
1.0.0+2 #
- Set correct scale in iOS
1.0.0+1 #
- Update pub description
1.0.0 #
- Initial Release
- Works better