Parsing username from print job

Dispatcher Paragon can be configured to allow external systems to generate print jobs in Dispatcher Paragon. In order to do that the appropriate method for identifying user needs to be selected.

In case print jobs are sent to Dispatcher Paragon FlexiSpooler in server mode by some external system that is using common username for all users, e.g. all jobs are sent from sap_administrator account, Dispatcher Paragon can be set to parse user's identity from:

  • Print job title

    • The feature is enabled via the configuration option parseUserFromTitle = <user_names>, which is empty by default. The <user_names> value can contain multiple users, separated by "comma" symbol ( , ).

    • The user name must be provided as a part of the job title, delimited by sign defined in configuration property parseUserFromTitleDelimiter (default values: "dot" or "colon" or "underscore" or "slash" or "backslash" – e.g. USER.title or USER:title or USER/title or USER_title.

    • Position of user name could be specified by configuration property parseUserFromTitleIndex (0 for USER.title, 1 for something.USER.title etc.).

    • It is also possible to keep original job title by setting configuration property parseUserFromTitlePreserverTitle (default behavior is removing user name from title: someting.USER.title -> something.title).

  • PJL command in print job data stream

    • PJL header can be used to detect user identity.

    • This feature is enabled via the configuration option parseUserFromJob (enabled by default)

    • Regular expression for detecting username from PJL headers could be specified by configuration property ParserPJLUser (Default: @PJL USER[ ]*=[ ]*(.*)(@|\n|\r) ). The string that matches the first group in the regular expression is used as the print job owner. ( @PJL USER = username )

    • In case user information is blank in PJL header (@PJL USER = ) FlexiSpooler will use username extracted from LPR header.

    • PJL header in defined format (for example: @PJLUSER = username) needs to be in print file somewhere before PJL command @PJL ENTER LANGUAGE.

images/s/en_GB/7502/85262de2dab440f060366aadca149a69d65c1f59/_/images/icons/emoticons/warning.png Please note, that usernameFormat setting is not applied to results of any of the above methods, FSP will always use as username what it has extracted.

Examples of Regular Expressions - ParserPJLUser

When defining the regex pattern it is important to always set '(.*)' in order to match the Username value. For example:

Job Header

Pattern

Parsing result for Username

@PJL USER = tester@domain.com\n

@PJL USER[ ]*=[ ]*(.*)@

tester

@PJL USER = bob\n

@PJL USER[ ]*=[ ]*(.*)

bob

@PJL USER = "filip"\n

@PJL USER[ ]*=[ ]*(.*)

filip

@PJL USER = "" or @PJL USER =

@PJL USER[ ]*=[ ]*(.*)

(Username extracted from LPR header)

When the regex pattern does not match with the expression on the job header, it will be reflected on the spooler.log.