Skip to main content

pdfx 2.11.1 copy "pdfx: ^2.11.1" to clipboard
pdfx: ^2.11.1 copied to clipboard

Flutter plugin to render & show PDF pages as images on Web, MacOS, Windows, Android and iOS.

2.11.1 #

  • Fixed cropRect rendering on Android, which used the page width as the crop width, and made Android, iOS and macOS render only the requested region instead of allocating the full page pull#649
  • Fixed the Android build on AGP 9 when android.builtInKotlin is not set, and stopped Flutter from reporting pdfx as applying the Kotlin Gradle Plugin pull#657

2.11.0 #

  • Added Swift Package Manager support for iOS and macOS, consolidating the duplicated Apple implementation into shared Darwin sources while retaining CocoaPods compatibility pull#623
  • Fixed a NaN/Infinity crash in PdfViewPinch document progress when the document exactly fits the viewport pull#621
  • Raised the minimum Flutter version to 3.29.0, since the current onSurfaceAvailable/onSurfaceCleanup SurfaceProducer.Callback overrides do not exist on older engines and failed to compile on Flutter 3.24-3.28 issue#580

2.10.0 #

  • Supported AGP 9 built-in Kotlin pull#624
  • Supported Windows ARM64 build pull#620
  • Fixed Windows build failure on CMake < 3.24 pull#612
  • Fixed WASM incompatibilities pull#611
  • Exposed onInteractionStart/onInteractionUpdate/onInteractionEnd on PdfViewPinch pull#594
  • Replaced deprecated Matrix4.translate/Matrix4.scale calls pull#630
  • Updated docs to use dart run instead of the deprecated flutter pub run pull#597
  • Web: moved the pdf.js presence check from plugin registration to document open, so apps that depend on pdfx without opening a PDF no longer fail to start when pdf.js is not in web/index.html pull#633

2.9.2 #

  • Fixed PdfViewPinch when compiling to WASM pull#586

2.9.1 #

2.9.0 #

  • Implemented document progress feature pull#537
  • Migrated to SurfaceProducer in PDFX pull#543
  • Updated Messages.kt pull#541
  • Removed device_info_plus dependency pull#544
  • Updated iOS and macOS projects to remove warnings pull#562
  • Updated device_info_plus version pull#536

2.8.0 #

2.7.0 #

  • Fixed pageSnapping option pull#435
  • Migrated to package:web pull#493
  • Bumped device_info_plus dependency to ^10.0.1 pull#487
  • Adjusted default zoom parameters pull#487
  • Fixed memory leak (Web) pull#484
  • Upgrade dependencies

2.6.0 #

  • Flutter 3.16 compatibility

2.5.0 #

  • Upgrade dependencies

2.4.0 #

  • Upgrade dependencies
  • Dart 3, Flutter 3.10 compatibility pull#404
  • Transfer Pdf support check from viewer to renderer pull#392
  • Added reverse option in PdfView pull#412
  • Fixup rendering issues in chromium based web-browsers pull#402

2.3.0 #

  • Added option forPrint in image render pull#301
  • Added password support (web only) pull#354
  • Updated dependencies

2.2.0 #

  • Upgrade dependency device_info_plus to v4
  • Fixed flutter 3.0 build
  • Fixed web install script
  • Fixed some bugs

2.1.0 #

2.0.1+2 #

  • Fixed broken links at pub.dev
  • Fixed readme
  • Update pdfjs version in installation script

2.0.1+1 #

  • Update readme

2.0.1 #

  • Fixed android launch

2.0.0 #

  • Provide more docs
  • Fixed windows support
  • Added builders argument for PdfViewPinch & PdfView. Example:
PdfViewPinch(
  builders: PdfViewPinchBuilders<DefaultBuilderOptions>(
    options: const DefaultBuilderOptions(
      loaderSwitchDuration: const Duration(seconds: 1),
      transitionBuilder: SomeWidget.transitionBuilder,
    ),
    documentLoaderBuilder: (_) =>
        const Center(child: CircularProgressIndicator()),
    pageLoaderBuilder: (_) =>
        const Center(child: CircularProgressIndicator()),
    errorBuilder: (_, error) => Center(child: Text(error.toString())),
    builder: SomeWidget.builder,
  ),
)
  • Added widget PdfPageNumber for show actual page number & all pages count. Example:
PdfPageNumber(
  controller: _pdfController,
  // When `loadingState != PdfLoadingState.success`  `pagesCount` equals null_
  builder: (_, state, loadingState, pagesCount) => Container(
    alignment: Alignment.center,
    child: Text(
      '$page/${pagesCount ?? 0}',
      style: const TextStyle(fontSize: 22),
    ),
  ),
)
  • Added listenable page number pageListenable in PdfController & PdfControllerPinch. Example:
ValueListenableBuilder<int>(
  valueListenable: controller.pageListenable,
  builder: (context, actualPageNumber, child) => Text(actualPageNumber.toString()),
)
  • Added listenable loading state loadingState in PdfController & PdfControllerPinch. Example:
ValueListenableBuilder<PdfLoadingState>(
  valueListenable: controller.loadingState,
  builder: (context, loadingState, loadingState) => (){
    switch (loadingState) {
      case PdfLoadingState.loading:
        return const CircularProgressIndicator();
      case PdfLoadingState.error:
        return  const Text('Pdf load error');
      case PdfLoadingState.success:
        return const Text('Pdf loaded');
    }
  }(),
)
  • Removed documentLoader, pageLoader, errorBuilderm loaderSwitchDuration arguments from PdfViewPinch & PdfView
  • Removed pageSnapping, physics arguments from PdfViewPinch
  • Rename PdfControllerPinch page control methods like a PdfController control names

1.0.1+1 #

  • Updated readme

1.0.1 #

  • Fixed platforms plugin

1.0.0 #

  • Initial release
532
likes
160
points
558k
downloads

Documentation

API reference

Publisher

verified publisherserge.software

Weekly Downloads

Flutter plugin to render & show PDF pages as images on Web, MacOS, Windows, Android and iOS.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

extension, flutter, flutter_web_plugins, meta, photo_view, plugin_platform_interface, synchronized, universal_platform, uuid, vector_math, web

More

Packages that depend on pdfx

Packages that implement pdfx