Choose your language

Choose your login

Contact us

Repeated Print Script Pop-ups

THE PAGE APPLIES TO:

Are you receiving multiple print script popups per print job?

From time to time sys admins will reach out to us about a strange quirk of print scripting, where the same pop-up will appear multiple times causing confusion for the end user.

This can occur if the print script requires user action for the job to be printed. The printjobhook runs multiple times during the hold release process. When prompting a dialogue from the printjobhook to users (e.g. prompOK) and the text of the pop-up may change after one iteration of the printjobhook, such as using an inconsistent variable or new timestamp, a pop-up can repeat. The default method of identifying an already invoked pop-up is by it’s contents. If these change then the script will start up another pop-up. This is by design as some scripts require multiple pop-ups with different questions or information.

Workaround

To workaround this, you will need to add an identifier (questionId) to the pop-up so that PaperCut will know that either the user has responded or that the pop-up already exists and is waiting for a response.

To do this use Client Prompt Standard Options, documented in Information about Client Prompt Standard Options and questionID.

Example usage:

var dialogOptions = {”questionID”:”incorrectPageSize”};

actions.client.promptOK(“This page size is not allowed.”, dialogOptions);


Categories: Troubleshooting Articles , Scripting and APIs


Keywords: scripting loop repeated pop-up pop up prompts options print papercut

Comments

Last updated February 15, 2024