Blog Post

PSPDFKit 6.6 for Android

Today we’re releasing PSPDFKit 6.6 for Android, in which we’re introducing support for bold and italic fonts, annotation selection UI customization, automated font sizing for form fields, and vertical text alignment for FreeTextAnnotations and WidgetAnnotations. We’ve also improved the performance for loading documents, optimized the memory required, and removed DeviceYearClass dependency in favor of an optimized in-house implementation. In this blog post, we outline the biggest changes in 6.6. For a full list of changes, please refer to our PSPDFKit 6.6 for Android changelog.

Support for Roboto Font Styles

In this release, we added support for setting bold and italic fonts via FreeTextAnnotation#setFontName(). Now Roboto-Regular, Roboto-Bold, and Roboto-Italic are fully supported. We also improved our internal logic so that fonts can now be selected by their full names:

val annotation = FreeTextAnnotation(pageIndex, boundingBox, "I am a bold text!")
annotation.fontName = "Roboto-Bold"

Annotation Selection UI Customization

With a new set of styleable attributes and the new theme configuration class, AnnotationSelectionViewThemeConfiguration, we exposed the option to customize the annotation selection view. Please refer to the new AnnotationSelectionViewStylingExample in the Catalog app for a demo of this feature.

Automated Font Sizing for Form Fields

With WidgetAnnotation.FONT_SIZE_AUTO, form field text size can now be set to the automatic font size. This is done by using WidgetAnnotation#setFontSize() and enabling automated font sizing while typing:

val formProvider = document.formProvider
val textField = formProvider.getFormFieldWithFullyQualifiedName("TextField") as TextFormField
textField.formElement.annotation.fontSize = WidgetAnnotation.FONT_SIZE_AUTO
textField.formElement.setText("Test text")

Vertical Text Alignment

We added vertical text alignment support for free text and widget annotations, and we exposed FreeTextAnnotation#set/getVerticalTextAlignment() and WidgetAnnotation#set/getVerticalTextAlignment(), which you can use to set and get the vertical text alignment.

Performance Enhancements and Optimizations

We improved performance loading for documents with some broken internal links, and we reduced the memory required to load PDF documents by 15 percent to 35 percent. We also removed the DeviceYearClass dependency, which was deprecated, and we opted for an in-house implementation that doesn’t require a third-party library, in order to optimize the default configuration. For more information on this, please have a look at our migration guide.

And More

As always, this is just a sneak peek at the enhancements we added to this release of our Android PDF Library. To see a complete list of changes, check out the PSPDFKit 6.6 for Android changelog.

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

Related Articles

Explore more
TUTORIALS  |  Android • Kotlin • Security • Signing • PDF • How To

Digital Signing on Android

TUTORIALS  |  Android • Kotlin • How To

Performing OCR on Android

DEVELOPMENT  |  Android • Kotlin • Insights

How Updating to Kotlin 1.4 Broke Our Linter Rules