Introduction
There are two ways of disabling printing inside the Viewer:
- Just disable printing when initializing the viewer
- 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"
.
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
- Design Basics - This topic gives you an overview of how to customize the Viewer.
- Available Parameters for the UI - This topic provides a list of available UI configuration options.
- Interactive Code Examples - These live code examples allow you to see how to customize the Viewer.