Choose your language

Choose your login


Deny Access to the Device Copy Function


Determine who can make copies when

Wouldn’t it be great if you had more ability to manage user access to the device copy function? Well, now you do. Managing copy access comes in handy for a lot of situations such as,

  • Only allowing copying for certain users or groups on specific devices
  • Restrict the number of copies a user can make in a day, week, etc.
  • Block color copying for specific user groups, or block it altogether
  • Limit the number of copies that can be made during peak usage times

This functionality is possible starting in PaperCut MF 19.2 and is enabled by two APIs in Device Scripting.


This method will block all copying for the currently logged in user at the device.


This method gives the ability to deny color copying for the current user. Grayscale / Black & White copies would still be allowed.

NOTE: The ability to deny access to the device copy function is in our Percolator and not yet supported on all platforms. As of PaperCut MF 19.2, denyCopyAccess and denyColorCopyAccess are supported on,

  • FX AIP V+
  • HP OXPd
  • KM
  • Kyocera HyPAS
  • Lexmark
  • Sharp OSA N2
  • Toshiba V3
  • Xerox EIP 1.5+

As of PaperCut MF 20.0, these APIs are also supported on,

  • Canon 2nd Gen
  • Canon 3rd Gen
  • Fuji Xerox AIP IV
  • Ricoh SmartSDK
  • Sharp OSA 3.5
  • Toshiba V2

There are other platforms in development, so make sure you test before using these APIs in a live environment.

Some Practical Implementations

NOTE: Before diving in to denying copy access feel free to peruse, How to create a Device Script

Let’s explore a couple of common use cases where denying access to copying is a useful tool. The first case is often requested by commercial organizations, and the second is more prevalent in education.

Use case #1: My organization would like to prevent copying after 6:00pm and on weekends for anyone not in the “Manager” group.

We can solve this case by using the current date and the group membership of the logged-in user. We can then deny access to copying if the conditions are met. Here’s an example script that could be entered for one device and copied to all others.

function deviceLoginHook(inputs, actions) {
  var hour =;
  var day =;
  if (hour < 8 || hour >= 18 || day == 0 || day == 6) {
    if (!inputs.user.isInGroup("Manager")) {

It’s important to include this in the deviceLoginHook. This means we can block access to the device copy function immediately after the user logs in.

Use case #2: My school’s Art department would like to allow copying on its devices for members of the Art staff only.

To solve this case all we really need to check is the user’s group membership.

function deviceLoginHook(inputs, actions) {
  if (!inputs.user.isInGroup("art_staff")) {

This script also is part of the deviceLoginHook so that unauthorized users would never have access to the device copy function. Since this script does not check if the device belongs to Art, it should only be applied to devices in the Art department.

If you want a more advanced script that could be used for devices in multiple departments, create Device Groups and use the inputs.device.isInGroup(groupName) API. This would allow one script to accommodate multiple devices and user groups, and then set copy access accordingly.

The User Experience

Once the user logs in at the device they will either have access to the copy function or not, based on the conditions tested in the Device Script. If they are allowed to make copies they should see the copy app.

Otherwise, they will be denied access (this could look different depending on the device manufacturer and model).


There are also two Device Script recipes we cooked up to provide working examples of these APIs. The first, “Impose a daily copy limit” demonstrates how to limit the number of copies a user can make in a day. This could easily be altered to limit by week, month or another date range. Second, the recipe “No copy for users in a selected group” is a nice template for restricting copy access by group membership.

Next Steps

If you’d like to try out Device Scripting and discover lots of other scenarios it can solve, take a look at our Device Scripting Help Center.

Still have questions?

Let us know! We love chatting about what’s going on under the hood. Feel free to leave a comment below or visit our Support Portal for further assistance.

Categories: How-to Articles , Scripting and APIs , Devices

Keywords: Scripting , Deny Copy , Zero Stop , mf-only


Last updated June 13, 2024