PrizmDoc Viewer v13.7 - Updated
Disable the Print Button
Developer Guide > Viewer > How to Customize the Viewer > Disable the Print Button

Introduction

There are two ways of disabling printing inside the Viewer:

Let’s have a closer look at how both of these options can be used.

Modifying the Printing Template

In order to remove printing from a template, you will need to open the "viewerTemplate.html" file that can be found inside a Samples folder. The exact location will depend on the type of sample you are using. For example, in the .NET/Webforms sample it will be located at:

...Prizm\Samples\dotnet\webforms\full-viewer-sample\viewer-assets\src\templates

Once you’ve opened the file, search for an element with the attribute data-pcc-print="launch" and delete it.

You will then need to build the Viewer assets by running "npm install" and "gulp build". Copy the output /dist/viewer-assets/js/viewerCustomizations.js file over the /viewer-assets/js/viewerCustomizations.js file in the sample. For more information on building the Viewer assets, see the README file in the viewer-assets folder.

Configuring Viewer Parameters

In order to disable printing via the Viewer parameters options object, that is passed to the Viewer, add the following uiElements parameter to the options object:

Example

var pluginOptions = {
    uiElements: {
        printing: false
    }
};

For example, in the .NET/Webforms sample this options object is being created in the ‘Default.aspx’ file.

Additional Resources