Skip to main content

Document bar

Learn how to open a new document, save currently opened documents, close documents, and print a currently displayed document. The document bar lets you utilize the following document-level operations:

  • Open a new document. You can open documents using drag and drop.
  • Save a currently displayed document. This triggers the browser-specific download action.
  • Close a currently displayed document.
  • Print a currently displayed document. A print dialog appears that lets the user select the pages to print. The selected pages are then rendered into images and given to the browser's print dialog.

You can configure of each of the previously described actions in the viewer.permissions.

Modified documents

When a user tries to open a new document without saving the currently modified document, PDF Viewer SDK displays a dialog box to let the user choose whether to save or discard the current document.

The described dialog box is not displayed when closing the web browser window, closing a tab, or navigating through the browser history.

Printing

The rendering-based printing architecture implies the following:

  • The time and memory used while preparing the print depends on the number of selected pages.
  • Elements such as text and vector graphics can become slightly blurred when printed. This happens because the printer's resolution can exceed the rendering resolution, which is set to 150 DPI.