Open a ticket
Chat with us
Click or drag to resize

Setting available toolbar options

Please note that application of the options described in this section depend on the initial set up explained here.

This is an example which shows all available toolbar options and its default values.
If you are fine with the default value, you can omit it, otherwise set it to false.

C#
using PdfViewer = Terminalworks.PdfViewer.AspNetCore;

var options = new PdfViewer.Options {
  Toolbar = new PdfViewer.ToolbarOptions {
    IsBookmarksVisible = true,
    IsDocumentInfoVisible = true,
    IsMultiViewVisible = true,
    IsNextPageVisible = true,
    IsNextVisitedVisible = true,
    IsOpenVisible = true,              
    IsCloseVisible = true,
    IsPageNumberVisible = true,
    IsPreviousPageVisible = true,
    IsPreviousVisitedVisible = true,
    IsPrintVisible = true,
    IsRotateClockwiseVisible = true,
    IsRotateCounterClockwiseVisible = true,
    IsDownloadVisible = true,
    IsSearchVisible = true,
    IsSingleViewVisible = true,
    IsToolbarVisible = true,
    IsTooltipVisible = true,
    IsZoomDropDownVisible = true,
    IsZoomInVisible = true,
    IsZoomOutVisible = true
  }
};

Example how to hide Bookmark and Document info buttons from the toolbar:

C#
using PdfViewer = Terminalworks.PdfViewer.AspNetCore;

var options = new PdfViewer.Options {
  Toolbar = new PdfViewer.ToolbarOptions {
    IsBookmarksVisible = false,
    IsDocumentInfoVisible = false
  }
};
Copyright © 2024 Terminalworks. All Rights Reserved