Overview
directprint.io allows administrators to set user data such as PIN numbers or accounting codes via Google Workspace.
Administrators may also set arbitrary custom data that can be used in PJL commands that are then sent to printers. This can include information such as Smartcard-ID, additional accounting information, or any other technical parameters required by the printer.
Data is managed within the user’s record within Google Workspace.
directprint.io uses the custom attribute capability of Google Workspace to define and set custom data (called custom attributes in Workspace).
This guide gives an overview of how to set user-specific customer data.
Custom data is divided into two categories:
- User data that has a direct effect on the operation of the directprint.io client
- Arbitrary data that can be passed through to the printer via PJL commands.
Google Workspace setup.
The administrator will need to define the directprint.io schema in Google Workspace to allow the setting of custom attributes against the user record.
Google overview of custom attributes here: https://support.google.com/a/answer/6208725?hl=en
Set up the directprint.io schema
- Navigate to the ‘Users’ option within Google Workspace
- Under the ‘More’ dropdown, select Manage custom attributes.
- Click ‘Add custom attribute’
- Enter the category as directprint.io (ensure all lowercase, include the ‘.’)
- Enter one or more reserved custom attributes from the table below. Only enter the attributes that you require to be set (no need to enter all of them if they are unused)
- Resync your Workspace data with directprint.io to ensure that custom fields are transferred.
List of reserved attributes, with specific effects on the directprint.io client
Google Workspace settings |
Information |
||||
Name |
Type |
Visibility |
Single/multi |
directprint.io PJL substitution variable |
Description |
PIN |
Text |
Visible to user and admin |
Single Value |
<<%%pin%%>> |
Sets the end-user PIN to the specified value - the user cannot change the PIN in the client (makes pin read-only). |
ACCOUNTING_CODE |
Text |
Visible to user and admin |
Single Value |
<<%%deptCode%%>> |
Sets the end-user accounting code to the specified value - the user cannot change the accounting code (makes accounting code read-only). |
USERNAME |
Text |
Visible to user and admin |
Single Value |
Full username: <<%%fullUserName%%>> Truncated to 8 chars: <<%%username%%>> or <<%%shortUserName%%>> |
Sets the username used in PJL. Will override the generated G Suite or Windows-derived username |
Table 1 - Reserved attribute names
Please note: Defining the schema and then not entering a value against the user record will have no effect on the client - i.e. default PIN and accounting code values will be used.
Entering per-user custom attributes
- Navigate to a user record in Workspace.
- Select ‘User information’
- You should see the custom ‘directprint.io’ schema with the selected attributes
- Set the PIN, ACCOUNTING_CODE, or USERNAME fields accordingly.
- Save the user record
The data will be populated to directprint.io on the next Google Workspace Synchronization (nightly, or when forced by the administrator).
Using arbitrary custom data with PJL commands
The system can also be configured to pass arbitrary key-value data to the client and printers via PJL commands.
In the following example, we pass a smartcard ID to a printer in a PJL command.
- Set up the arbitrary attribute in the directprint.io schema in Workspace:
- Follow steps 1-4 of To set up the directprint.io schema:
- For the arbitrary attribute, select a name that does not conflict with the reserved attribute in Table 1 - Reserved attribute names.
- E.g. SmartCard-ID
Name |
Type |
Visibility |
Single/multi |
directprint.io PJL substitution variable |
SMARTCARDID |
Text |
Visible to user and admin |
Single Value |
<<%%customData.SMARTCARDID%%>> |
The resulting PJL substitution will be <<%%customData.SMARTCARDID%%>>
Please note that customData and the admin-defined attribute are case-sensitive.
In this case customData.STARTCARDID
- Set the SMARTCARDID value for the user per Entering per-user custom attributes above. E.g. ‘45ad3f12ccad132fdc’
To use resulting SMARTCARDID data value in a PJL:
e.g.
@PJL SET SMARTCARD = <DQ><<%%customData.SMARTCARDID%%>><DQ>
At print-time the PJL will be converted to:
@PJL SET SMARTCARD = “45ad3f12ccad132fdc”