Supporting right-to-left (RTL) language documents in Android
To support right-to-left (RTL) language documents, the Apryse SDK provides a high-level API for changing the reading direction of documents in your document viewer.

If you are using DocumentActivity or PdfViewCtrlTabHostFragment2, you can enable right-to-left (RTL) support in your document viewer by setting it with ViewerConfig:
ViewerConfig.Builder builder = new ViewerConfig.Builder();
ViewerConfig config = builder
.fullscreenModeEnabled(true)
.multiTabEnabled(true)
.documentEditingEnabled(true)
.longPressQuickMenuEnabled(true)
// ...
.rightToLeftModeEnabled(true) // Enable RTL mode, must also call showRightToLeftOption
.showRightToLeftOption(true) // Show RTL toggle button in view mode dialog
.build();val builder = ViewerConfig.Builder()
val config = builder
.fullscreenModeEnabled(true)
.multiTabEnabled(true)
.documentEditingEnabled(true)
.longPressQuickMenuEnabled(true)
// ...
.rightToLeftModeEnabled(true) // Enable RTL mode, must also call showRightToLeftOption
.showRightToLeftOption(true) // Show RTL toggle button in view mode dialog
.build()If you would like more granular control over your document viewer, you can enable right-to-left (RTL) directly in PDFViewCtrl by calling PDFViewCtrl.setRightToLeftLanguage(true).
Last updated
Was this helpful?