Repeated Print Script Pop-ups

KB Home   |   Repeated Print Script Pop-ups

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.

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. Information about Client Prompt Standard Options and questionID here: https://www.papercut.com/products/ng/manual/common/topics/script-print-api.html#script-print-actions-client-stdopts

Example usage:

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

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


Categories: Scripting


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

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on October 25, 2017, at 07:04 AM
Printable View   |   Article History   |   Edit Article