> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/android/changelogs/version-9/v9-2-2.md).

# Version 9.2.2 Changelog (April 29, 2022)

World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

Version: 9.2.2.79486

Release Date: April 29, 2022

## New features

* Now targeting Android 12
* New ability to set free text horizontal and vertical alignment

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-4e07b2f862a60424b1206e37be9a5bfe8c11d57a%2F28383cf1f574f3588b0e480dd4459c20dd16640c-600x1300.gif?alt=media)

* New ability to type a signature when signing a document

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-96ac2b82d1f9a840117544d0805209edd3d50170%2F1ffecc3c077e868fd59f8b3ab800d9940393198a-540x1069.png?alt=media)

* New sound annotation creation UI/UX: you can now use other tools while recording, as well as moving the recording view via drag and drop

![](https://226546913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0QItsdFBmuuL9ezHimHy%2Fuploads%2Fgit-blob-d62923588e6e4488aeb9449c6868f82e72a8f30b%2F1b42cd1b88a1071bbbd1d99645533da15a454300-540x295.png?alt=media)

* New ability to edit initial annotation content in the collaboration viewer
* New API to specify [maximum saved signature count](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/dialog/signature/SignatureDialogFragment.html#MAX_SIGNATURES)
* New API to notify when [password is supplied](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/controls/PdfViewCtrlTabBaseFragment.PasswordProtectedListener.html) by the user after opening a password protected document
* New API to notify when [saved signature count](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/utils/StampManager.SignatureListener.html) changes
* New save file attachment option for file attachment annotation

## Breaking changes

* [`AnnotStyle.OnAnnotStyleChangeListener`](https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/model/AnnotStyle.OnAnnotStyleChangeListener.html) added \[`onChangeTextAlignment`]\(<https://sdk.apryse.com/api/android/javadoc/reference/com/pdftron/pdf/model/AnnotStyle.OnAnnotStyleChangeListener.html#onChangeTextAlignment(int>, int)) callback

## Fixed

* Fixed regression issue on spacing free text and rich free text
* Fixed issue where whitespace is not preserved in free text
* Fixed issue where popup edit menu appears in the wrong location in the collaboration viewer
* Fixed issue where display name is random string when printing office document to PDF through printing
* Fixed issue where Windows line ending is not recognized in the annotation note dialog
* Fixed issue where reply XFDF has different formatting than the Web platform
* Fixed potential crash when using the annotation list fragment without the viewer

## APIs

### PDFViewCtrlTools package

#### ToolStyleConfig

*new* method: `int getCustomHorizontalAlignment(Context, int, String)`

*new* method: `int getCustomVerticalAlignment(Context, int, String)`

*new* method: `int getDefaultHorizontalAlignment(Context, int)`

*new* method: `int getDefaultHorizontalAlignment(Context, int, int)`

*new* method: `int getDefaultVerticalAlignment(Context, int)`

*new* method: `int getDefaultVerticalAlignment(Context, int, int)`

*new* method: `Set<String> getFreeTextFonts()`

*new* method: `Set<String> getFreeTextFontsFromAssets()`

*new* method: `Set<String> getFreeTextFontsFromStorage()`

*new* method: `String getHorizontalAlignmentKey(int, String)`

*new* method: `String getVerticalAlignmentKey(int, String)`

*new* method: `void setFreeTextFonts(Set<String>)`

*new* method: `void setFreeTextFontsFromAssets(Set<String>)`

*new* method: `void setFreeTextFontsFromStorage(Set<String>)`

#### AnnotStyleDialogFragment

*new* method: `void setCanShowTextAlignment(boolean)`

#### AnnotStyleView

*new* method: `void setCanShowTextAlignment(boolean)`

#### PasswordDialogFragment

*new* method: `void onStart()`

#### PasswordDialogFragment.Builder

*new* class: `Builder`

*new* constructor: `Builder()`

*new* method: `PasswordDialogFragment build()`

*new* method: `Builder setAllowEmptyPassword(boolean)`

*new* method: `Builder setConfirmationHint(String)`

*new* method: `Builder setFile(File)`

*new* method: `Builder setFileType(int)`

*new* method: `Builder setHint(String)`

*new* method: `Builder setId(String)`

*new* method: `Builder setPath(String)`

*new* method: `Builder setPositiveStringRes(int)`

*new* method: `Builder setRequireConfirmation(boolean)`

#### PdfViewCtrlTabBaseFragment

*new* method: `void addPasswordProtectedDocumentListener(PasswordProtectedListener)`

*new* method: `void onSaveFileAttachmentSelected(FileAttachment, Intent)`

*new* method: `void removePasswordProtectedDocumentListener(PasswordProtectedListener)`

*removed* method: `void onBookmarkModified()`

*modified* abstract class: `PdfViewCtrlTabBaseFragment`

|       | Declaration                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| From: | public abstract class PdfViewCtrlTabBaseFragment extends Fragment implements PageChangeListener,DocumentDownloadListener,UniversalDocumentConversionListener,DocumentLoadListener,RenderingListener,UniversalDocumentProgressIndicatorListener,PreToolManagerListener,QuickMenuListener,AnnotationModificationListener,PdfDocModificationListener,PdfTextModificationListener,BasicAnnotationListener,OnGenericMotionEventListener,ToolChangedListener,AdvancedAnnotationListener,OnReflowTapListener,PortfolioDialogFragmentListener                                  |
| To:   | public abstract class PdfViewCtrlTabBaseFragment extends Fragment implements PageChangeListener,DocumentDownloadListener,UniversalDocumentConversionListener,DocumentLoadListener,RenderingListener,UniversalDocumentProgressIndicatorListener,PreToolManagerListener,QuickMenuListener,AnnotationModificationListener,PdfDocModificationListener,PdfTextModificationListener,BasicAnnotationListener,OnGenericMotionEventListener,ToolChangedListener,AdvancedAnnotationListener,FileAttachmentAnnotationListener,OnReflowTapListener,PortfolioDialogFragmentListener |

#### PasswordProtectedListener

*new* interface: `PasswordProtectedListener`

*new* method: `boolean onPasswordInvalid()`

*new* method: `void onPasswordValid()`

#### ThumbnailsViewFragment

*new* static field: `boolean HANDLE_INTENT_IN_ACTIVITY`

#### SignatureDialogFragment

*new* static field: `int MAX_SIGNATURES`

*new* static method: `boolean atMaxSignatureCount(int)`

#### AnnotStyle

*new* method: `int getHorizontalAlignment()`

*new* method: `int getVerticalAlignment()`

*new* method: `boolean hasTextAlignment()`

*new* method: `void setHorizontalAlignment(int)`

*new* method: `void setVerticalAlignment(int)`

*new* method: `void updateTextAlignment(int, int, boolean)`

#### OnAnnotStyleChangeListener

*new* method: `void onChangeTextAlignment(int, int)`

#### AnnotStyleProperty

*new* method: `boolean canShowTextAlignment()`

*new* method: `AnnotStyleProperty setCanShowTextAlignment(boolean)`

#### FreeTextInfo

*new* static method: `Rect getFreeTextBBoxSimple(FreeText)`

*new* static method: `boolean setFontSimple(FreeText, String)`

#### AnnotEdit

*new* method: `void onChangeTextAlignment(int, int)`

#### DialogFreeTextNote

*new* method: `void setHorizontalTextAlignment(int)`

*new* method: `void setVerticalTextAlignment(int)`

#### FreeTextCreate

*new* static method: `Rect getRectUnion(Rect, Rect)`

#### FreehandCreate

*new* method: `void saveAnnotation()`

#### SoundCreate

*new* method: `void createSound(PointF, int, String)`

#### StickyNoteCreate

*new* method: `void onChangeTextAlignment(int, int)`

#### Tool

*new* static method: `String getHorizontalAlignmentKey(int)`

*new* static method: `String getVerticalAlignmentKey(int)`

#### ToolManager

*new* method: `Tool createTool(ToolModeBase, Tool, Bundle, boolean)`

*new* method: `SoundManager getSoundManager()`

*new* method: `void onSaveFileAttachmentSelected(FileAttachment, Intent)`

*new* method: `void setFileAttachmentAnnotationListener(FileAttachmentAnnotationListener)`

*removed* method: `void raiseBookmarkModified()`

#### FileAttachmentAnnotationListener

*new* interface: `FileAttachmentAnnotationListener`

*new* method: `void onSaveFileAttachmentSelected(FileAttachment, Intent)`

#### PdfDocModificationListener

*removed* method: `void onBookmarkModified()`

#### UndoRedoManager

*removed* method: `void onBookmarkModified()`

#### AnnotUtils

*new* static method: `Annot createAnnotationStateReply(String, int, PDFViewCtrl, String, String, AnnotReviewState)`

*new* static method: `void createSoundAnnotation(PDFViewCtrl, PointF, int, String)`

*new* static method: `FileAttachment getFileAttachment(PDFViewCtrl, Annot)`

*removed* static method: `Annot createAnnotationStateReply(String, int, PDFViewCtrl, String, AnnotReviewState)`

#### FreeTextAlignmentUtils

*new* class: `FreeTextAlignmentUtils`

*new* constructor: `FreeTextAlignmentUtils()`

*new* static method: `int getHorizontalAlignment(FreeText)`

*new* static method: `int getVerticalAlignment(FreeText)`

*new* static method: `boolean isLeftAligned(int)`

*new* static method: `void setHorizontalAlignment(FreeText, int)`

*new* static method: `void setVerticalAlignment(FreeText, int)`

#### InlineEditText

*new* method: `void setCalculateAlignment(boolean)`

#### SoundManager

*new* class: `SoundManager`

*new* constructor: `SoundManager()`

*new* method: `void close()`

*new* method: `SoundAnnotView createSoundView(PDFViewCtrl, PointF, int)`

*new* method: `SoundAnnotView createSoundView(PDFViewCtrl, String, int, int, int)`

*new* method: `void removeView(SoundAnnotView)`

#### StampManager

*new* method: `boolean createTypedSignature(String, TextView, int, String)`

*new* method: `void savedSignatureCreated()`

*new* method: `void savedSignatureDeleted()`

*new* method: `void setSignatureListener(SignatureListener)`

*modified* method: `Page createVariableThicknessSignature(String, RectF, List<double[]>, int, float)`

|       | Declaration                                                                                  |
| ----- | -------------------------------------------------------------------------------------------- |
| From: | public Page createVariableThicknessSignature(String, RectF, List\<double\[]>, int, float)    |
| To:   | public boolean createVariableThicknessSignature(String, RectF, List\<double\[]>, int, float) |

#### SignatureListener

*new* interface: `SignatureListener`

*new* method: `void onSavedSignatureCreated()`

*new* method: `void onSavedSignatureDeleted()`

#### Utils

*new* static method: `Intent createSystemPickerIntentAllSource(String[], boolean)`

*new* static method: `boolean hasAudioPermission(Activity, View, int)`

*removed* static method: `String decryptIt(Context, String)`

*removed* static method: `String encryptIt(Context, String)`

#### ViewerUtils

*new* static method: `boolean exportFileAttachment(PDFViewCtrl, FileAttachment, Uri)`

*new* static method: `Intent getFileIntent(String, String)`

#### AnnotView

*new* method: `void updateAlignment(int, int)`

#### AutoScrollEditText

*new* method: `void setCalculateAlignment(boolean)`

*new* method: `void updateBBox()`

#### AutoScrollEditor

*new* method: `void setCalculateAlignment(boolean)`

#### SoundAnnotView

*new* class: `SoundAnnotView`

*new* constructor: `SoundAnnotView(PDFViewCtrl, PointF, int)`

*new* constructor: `SoundAnnotView(PDFViewCtrl, String, int, int, int)`

*new* static final field: `String TAG`

*new* method: `void dismiss()`

*new* method: `void handleDone()`

*new* method: `boolean isShowing()`

*new* method: `void onStop()`

*new* method: `boolean onTouchEvent(MotionEvent)`

*new* method: `void requestLocation()`

*new* method: `SoundAnnotView setEncodingBitRate(int)`

*new* method: `SoundAnnotView setFilePath(String)`

*new* method: `SoundAnnotView setNumChannelOut(int)`

*new* method: `SoundAnnotView setSampleRate(int)`

*new* method: `void show()`

#### SignatureSelectionDialog

*new* method: `void setViewVisibility(int, int)`

#### SignatureSelectionView

*new* method: `void setViewVisibility(int, int)`

### pdftron-collab package

#### AnnotationDao

*new* method: `void updateServerId(String, String)`

#### AnnotationDao\_Impl

*new* method: `void updateServerId(String, String)`

#### AnnotationEntity

*new* method: `String getServerId()`

*new* method: `void setServerId(String)`

#### Annotation

*new* method: `String getServerId()`

#### CustomServiceUtils

*new* static method: `void updateServerId(CollabDatabase, String, String)`

#### ReplyHeaderUIView

*new* method: `void setCommentEditButton(boolean)`

#### ReplyInputUIView

*new* method: `void closeCommentEditView()`

*new* method: `void showEditCommentView(String)`

#### ReplyUIViewModel

*new* method: `LiveData<ReplyInput> getEditCommentLiveData()`

#### BaseHeaderUIView

*new* method: `void onAnnotCommentModifyClicked(ReplyHeader)`

*new* abstract method: `void setCommentEditButton(boolean)`

#### Type

*new* static final field: `Type ANNOT_COMMENT_MODIFY`

#### BaseTextInputUIView

*new* abstract method: `void closeCommentEditView()`

*new* method: `void onCommentEditCancelled()`

*new* method: `void onCommentEditChanged(String)`

*new* method: `void onCommentEditFinished(String)`

*new* abstract method: `void showEditCommentView(String)`

#### Type

*new* static final field: `Type COMMENT_EDIT_CANCELED`

*new* static final field: `Type COMMENT_EDIT_FINISHED`

*new* static final field: `Type COMMENT_EDIT_TEXT_CHANGED`

#### ReplyHeader

*new* constructor: `ReplyHeader(Context, AnnotationEntity)`

*new* method: `String getId()`

*new* method: `int getPageNum()`

*new* method: `boolean isCommentEditable()`

*new* method: `void setCommentEditable(boolean)`

*new* method: `void setHasAnnotList(boolean)`

*new* method: `void setHasReviewState(boolean)`

*new* method: `void setId(String)`

*new* method: `void setPageNumber(int)`

*new* static method: `ReplyHeader updatePreviewContent(ReplyHeader, String)`

*new* static method: `ReplyHeader updateReviewState(ReplyHeader, AnnotReviewState)`

*new* static method: `ReplyHeader updateUnreadReplies(ReplyHeader, boolean)`

#### CollabManager

*new* method: `List<AnnotationEntity> getAnnotations()`

*new* method: `String getCurrentDocument()`

*new* method: `void updateAnnotationServerId(String, String)`

*new* method: `void updateAnnotationServerIdSync(String, String)`

#### CollabViewerTabHostFragment2

*new* method: `PDFViewCtrl getPdfViewCtrl()`

*modified* class: `CollabViewerTabHostFragment2`

|       | Declaration                                                                                                                                                  |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| From: | public class CollabViewerTabHostFragment2 extends PdfViewCtrlTabHostFragment2 implements OpenAnnotationListListener,CollabTabListener                        |
| To:   | public class CollabViewerTabHostFragment2 extends PdfViewCtrlTabHostFragment2 implements OpenAnnotationListListener,CollabTabListener,AdvancedViewerListener |

#### XfdfUtils

*new* static method: `ArrayList<AnnotationEntity> convToAnnotations(String, String, String, String, AnnotationDao)`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/android/changelogs/version-9/v9-2-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
