Blazor PDF Viewer Example - Custom Toolbar
This sample demonstrates how to build a customized toolbar for the PDF Viewer, enabling you to add tools that are tailored to your specific requirements. The toolbar leverages the SfPdfViewer API to provide a streamlined experience for navigation, search, annotations, printing, downloading, and zoom operations.
The following examples illustrate how the PDF Viewer API is used from the custom toolbar to perform common tasks:
- Go to previous page – "viewer.GoToPreviousPageAsync()"
- Go to next page – "viewer.GoToNextPageAsync()"
- Go to page – "viewer.GoToPageAsync(pageindex)"
- Search text – "viewer.SearchTextAsync()"
- Search next text – "viewer.SearchNextAsync()"
- Search previous text – "viewer.SearchPreviousAsync()"
- Cancel text search – "viewer.CancelTextSearchAsync()"
- Print – "viewer.PrintAsync()"
- Download – "viewer.DownloadAsync()"
- Load document – "viewer.LoadAsync(String, String)"
- Set annotation mode – "viewer.SetAnnotationModeAsync(AnnotationType)"
- Edit annotation – "viewer.EditAnnotationAsync(AnnotationType)"
- Get annotations – "viewer.GetAnnotationAsync()"
- Zoom in – "viewer.ZoomInAsync()"
- Zoom out – "viewer.ZoomOutAsync()"
- Fit to page – "viewer.FitToPageAsync()"
For more information about toolbar customization in the SfPdfViewer, see the documentation section. Looking for the full Blazor PDF Viewer component overview, features, pricing, and documentation? Visit the Blazor PDF Viewer Page.