PrizmDoc® Viewer v14.0 Release - Updated
PrizmDoc Viewer / Developer Guide / Viewer / How to Customize the Viewer / Disable the Print Button
In This Topic
    Disable the Print Button
    In This Topic

    Introduction

    There are two ways of disabling printing inside the Viewer:

    1. Just disable printing when initializing the viewer
    2. Make a custom build of the viewer which has the printing button removed from the UI

    Option 1: Just Disable Printing When Initializing the Viewer

    You can easily disable printing when initializing the viewer. Just add the following uiElements parameter to the options object:

    Example

    <script type="text/javascript">
      $(function() {
        $('#viewerContainer').pccViewer({
          /*
             ...other required options omitted for clarity...
           */
          uiElements: {
            printing: false
          }
        });
      });
    </script>
    
    

    Option 2: Make a Custom Build of the Viewer

    If you need more customization of the viewer UI than the initialization API allows, you can always perform your own custom build of the viewer after modifying the original HTML templates. To do this, you will need the source code for the client viewer build, available at https://github.com/Accusoft/prizmdoc-viewer.

    If you wanted to remove the printing button from the UI in this way, you would need to modify src/templates/viewerTemplate.html, removing the element with the attribute data-pcc-print="launch". NOTE: Refer to the Customizing the Viewer section for details on using the viewerTemplate.html.

    After you have made your changes, perform your own build and use the new dist/viewer-assets output in place of the existing viewer-assets in your application.

    For more information about building the client viewer, see the README.

    Additional Resources