Customization of User Interface in GemBox.PdfViewer

You can customize which options will be visible in the GemBox.PdfViewer's toolbar.

By default, all toolbar options are visible. You can customize the visibility of individual toolbar options. The following example demonstrates how to disable the document's search feature.

GemBoxPdfViewer.create({
	container: "#viewer",
	visibility: {
		search: false,
	}
});
PDF viewer with disabled search option
PDF viewer with disabled search option

The following example shows how to hide all toolbar options and use GemBox.PdfViewer in its most basic form. The example also shows all properties that allow you to hide corresponding toolbar options.

GemBoxPdfViewer.create({
	container: "#viewer",
	visibility: {
		sideMenu: false,
		open: false,
		print: false,
		download: false,
		pageNavigation: false,
		panMode: false,
		zoom: false,
		search: false
	}
});
PDF viewer with all disabled options
PDF viewer with all disabled options

Toolbar customization when using ASP.NET Core tag helper

When using tag helper, you can customize the toolbar when initializing the PDF viewer:

<gembox-pdfviewer style="width:600px;height:350px;" initial-document="./document.pdf" license-key="FREE-LIMITED-KEY">
    <pdfviewer-visibility
        side-menu="false"
        open="false"
        print="false"
        page-navigation="false"
        zoom="false"
        pan-mode="false"
        search="false"/>
</gembox-pdfviewer>

See also


Next steps

GemBox.PdfViewer is a JavaScript library that enables you to show PDF files seamlessly in your web applications.

Download Buy