Choose your language

Choose your login

Support

How can we help?

PaperCut's AI-generated content is continually improving, but it may still contain errors. Please verify as needed.

Lightbulb icon
Lightbulb icon

Here’s your answer

Sources:

* PaperCut is constantly working to improve the accuracy and quality of our AI-generated content. However, there may still be errors or inaccuracies, we appreciate your understanding and encourage verification when needed.

Lightbulb icon

Oops!

We currently don’t have an answer for this and our teams are working on resolving the issue. If you still need help,
User reading a resource

Popular resources

Conversation bubbles

Contact us

Advanced Scripting: Conditionally Suppress Pop-up

THE PAGE APPLIES TO:

Last updated September 30, 2025

In education and corporate firms, it is very common to use account selection popups. It allows users to select the account they want to print to.

These organizations also do not want to annoy their users with an unnecessary number of pop-ups and instead only want to track jobs over a certain page count, or dollar amount. For example: Do not display shared account selection popup if the number of pages is less than 10 and charge to personal account. This can be achieved by using Advanced Scripting.

Scripts are available under Printers → [Name of the printer] → Scripting. These scripts are very useful when such customization need to be implemented. This feature makes PaperCut a powerful tool and can be customized to meet requirements of different organizations.

The account selection popups are displayed before the analysis is even complete which is what makes it tricky to suppress the popup. To be able to do this there is a small trick will you need to follow. You will need to add “actions.job.chargeToPersonalAccount();” to the section where analysis is not complete.

actions.job.chargeToPersonalAccount() is an API that is used to disable any client popups and account selection, and to charge the job to the user’s personal account.

See the script below:

function printJobHook(inputs, actions) {

  if (!inputs.job.isAnalysisComplete) {

    actions.job.chargeToPersonalAccount();
    return;
  }

  if (inputs.job.totalPages < 10) { 
    // Charge to the personal account
    actions.job.chargeToPersonalAccount();
    // Or maybe charge to a single shared account
  }
  // Account Selection will still show 
}

Category: How-to Articles

Subcategory: Notifications, Scripting and APIs


Keywords: customizing, Print Scripting, display popup

Comments