Blog Post

PSPDFKit 3.1 for Flutter Unifies Platform APIs

With the release of PSPDFKit 3.1 for Flutter, we’re proud to announce some shiny new additions — like the PDF widget for Android, a unified experience for Android and iOS, improved documentation, and many other feature and quality of life improvements.

PDF Widget for Android

PDF Widget for Android

Starting with PSPDFKit 3.1 for Flutter, we implemented widget support for Android. The PDF widget allows you to embed PDF functionality into your app without a fullscreen modal presentation. You can now add listeners for various events on the widget and perform actions such as programmatically adding or removing annotations based on triggers in your Dart code. These functionalities are all in addition to the configuration options, which allow you to customize various aspects of the PDF view before you present it. To try the new widget, use the PspdfkitWidget(documentPath: document.path) syntax.

For a more extensive set of examples showcasing widget use, please refer to our PSPDFKit Flutter example app and look at the PSPDFKit Widget Examples section.

Unified APIs for Both Mobile Platforms

Unified APIs

With version 3.1 of PSPDFKit for Flutter, we unified the exposed APIs for both Android and iOS to offer a more consistent experience. Many features that were previously only supported on the iOS side have now landed on the Android side as well. The following APIs now support Android too:

  • PspdfkitWidget.applyInstantJson

  • PspdfkitWidget.exportInstantJson

  • PspdfkitWidget.setFormFieldValue

  • PspdfkitWidget.getFormFieldValue

  • PspdfkitWidget.addAnnotation

  • PspdfkitWidget.getAnnotations

  • PspdfkitWidget.getAllUnsavedAnnotations

  • PspdfkitWidget.save

We also updated several configuration options in Flutter that were previously platform specific. These have been unified so that they work on both platforms. In addition, we renamed platform-specific configuration options with explicit prefixes (Android or iOS) to make it clear that they work only for one specific platform.

Improved Documentation

With this release, we launched a shiny new documentation section with a detailed getting started section, a system compatibility section, and many guides to help you smoothly integrate PSPDFKit for Flutter. And, as mentioned above, all the configuration options are documented as well!

Support for TIFF Image Documents for Android

Now you can open .tiff files in addition to the already supported .png and .jpeg image files. All you need to do is add the following:

const String _imagePath = 'PDFs/PSPDFKit_Image_Example.jpg';

// The `extractAsset` function copies the image to the cache directory and returns a `Future<File>` object.
final extractedImage = await extractAsset(_imagePath);

// PSPDFKit widget can open PNG, JPEG, and TIFF image files directly.
PspdfkitWidget(documentPath: extractedImage.path)

And More!

In this minor release, we updated the Flutter version to 2.8.1 and updated all its relevant dependencies. In addition to all the changes mentioned above, we revamped all the examples in our sample project to showcase all the newly added iOS and Android APIs. The PSPDFKit for iOS SDK dependency has also been updated to use the latest version, 11.2.

To see a complete list of changes, check out the PSPDFKit 3.1 for Flutter changelog.

If you’re interested in PSPDFKit for Flutter, please contact our sales team. For a complete list of features, please visit our product page. We’d love to hear about your use case and discuss how to best implement it.

Related Products
PSPDFKit for Flutter

Product Page
Guides
Example Projects

Share Post
Free 60-Day Trial Try PSPDFKit in your app today.
Free Trial

Related Articles

Explore more
PRODUCTS  |  Flutter • Releases

PSPDFKit 3 for Flutter Adds TIFF Image Documents

We use cookies to improve your experience and for marketing. Learn more in our privacy policy.