Mobile toolbar interface in ASP.NET MVC PDF Viewer

22 Oct 20252 minutes to read

The Mobile PDF Viewer offers a variety of features for viewing, searching, annotating, and managing PDF documents on mobile devices. It includes essential tools like search, download, bookmarking, annotation, and page organization. Users also have the option to enable desktop toolbar features in mobile mode, providing a more extensive set of actions.

Mobile mode toolbar configuration

In mobile mode, the toolbar is optimized for small screens and presents the most common actions for working with a PDF document. The key features available in mobile mode include:

Mobile toolbar with primary PDF interaction options

Main toolbar options

OpenOption: Tap to load a PDF document.

SearchOption: Access the search bar to find text within the document.

Search bar displayed for finding text within a PDF

UndoRedoTool: Quickly undo or redo any annotations made.

OrganizePagesTool: Enable or disable page organization features to modify document pages.

Page organization interface for modifying PDF pages

AnnotationEditTool: Activate or deactivate annotation editing to add or modify annotations.

Annotation editing toolbar allowing users to add, edit, or delete annotations on a PDF

NOTE

In mobile mode, the annotation toolbar is conveniently displayed at the bottom of the viewer.

More options menu

The More options menu provides additional actions such as:

DownloadOption: Tap to download the currently opened PDF document.

BookmarkOption: Allows you to view bookmarks within the document.

More options menu showing additional actions like download and bookmark

Enable desktop mode on mobile

Enable the desktop toolbar on mobile devices using the enableDesktopMode API. This brings desktop-like features to the mobile PDF Viewer, providing access to additional toolbar actions typically available on desktop platforms.

Steps to enable desktop mode

  • Set enableDesktopMode to true in the configuration.
  • The desktop toolbar layout replaces the mobile toolbar, allowing access to more actions and controls.
<div style="width:100%;height:600px">
        @Html.EJS().PdfViewer("pdfviewer").EnableDesktopMode(true).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render()
    </div>
<div style="width:100%;height:600px">
        @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).EnableDesktopMode(true).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render()
    </div>

Enable scrolling in desktop mode with touch gestures

To ensure smooth scrolling of PDF documents on a mobile device in desktop mode, enable touch-gesture scrolling by setting enableTextSelection to false.

<div style="width:100%;height:600px">
        @Html.EJS().PdfViewer("pdfviewer").EnableDesktopMode(true).EnableTextSelection(false).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render()
    </div>
<div style="width:100%;height:600px">
        @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).EnableDesktopMode(true).EnableTextSelection(false).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render()
    </div>

The Print option is not available in mobile mode by default. To use print on mobile devices, enable the desktop toolbar using the enableDesktopMode API.

How to use print on mobile

  • Enable desktop mode: Set enableDesktopMode to true to load the desktop toolbar on a mobile device.
  • Print option: Once desktop mode is enabled, the print option becomes available to print the document.

NOTE

In mobile mode, print is unavailable unless desktop mode is enabled.