Overview
The directprint.io client can substitute data into print jobs at print-time. The table below specifies the supported substitution variables available to developers or admins who want to customize printer behaviour through custom PPD files.
Example usage
The following custom PPD example enables secure print on an HP Laserjet printer using PJL commands.
*Manufacturer: "HP"
*ModelName: "All LaserJet Secure print (PIN)"
*PCFileName: "HP-secureprint.ppd"
*JCLBegin: "<1B>%-12345X@PJL <0A>"
*JCLEnd: ""
*OpenGroup: SecurePrint/Secure Print Release
*OpenUI *EnablePIN/Enable PIN release: PickOne
*DefaultEnablePIN: Enable
*EnablePIN Disable/Disable PIN release: ""
*EnablePIN Enable/Enable PIN release: "
@PJL SET JOBNAME = <DQ><<%%jobName%%>><DQ><0A>
@PJL SET USERNAME = <DQ><<%%username%%>><DQ><0A>
@PJL SET HOLD = STORE<0A>
@PJL SET HOLDTYPE = PRIVATE<0A>
@PJL SET HOLDKEY = <DQ><<%%pin%%>><DQ><0A>
"
*End
*DefaultEnablePIN: Enable
*CloseUI: *EnablePIN
*CloseGroup: SecurePrint
Substitution Variable List
PPD Variable | Output |
<<%%jobName%%>> or <<%%shortJobName%%>> |
Jobname sanitised to remove spaces and special characters, limited to 7 characters, with time appended. |
<<%%fullJobName%%>> | Full job name passed from the print ticket |
<<%%jobNameNoTime%%>> | Jobname sanitised to remove spaces and special characters, limited to 16 characters. |
<<%%pin%%>> | The PIN entered into the app by the user or force set by the administrator |
<<%%deptCode%%>> | The department code (account code) entered into the app by the user or force set by the administrator |
<<%%pin-xerox-simple-1%%>> | Encrypted PIN for Xerox printers |
<<%%pin-fuji-xerox%%>> | Encrypted PIN for Fuji-Xerox printers |
<<%%pin-sharp-mx%%>> | Encrypted PIN for Sharp printers |
<<%%hh:mm:ss%%>> | The spool time of the job in the format: hh:mm:ss |
<<%%hh:mm%%>> | The spool time of the job in the format: hh:mm |
<<%%yyyy/mm/dd%%>> | The date of the job in the format yyyy/mm/dd |
<<%%yyyy-mm-dd%%>> | The date of the job in the format yyyy-mm-dd |
<<%%username%%>> or <<%%shortUserName%%>> |
The username of the current user transformed and truncated to 8 characters: john.smith => smithjoh auseraccount => auseracc |
<<%%fullUserName%%>> |
The username of the current user according to the current policy in place (fullname / email / shortened name) See this article |
<<%%email-name-part1%%>> |
Email transformed: john.smith@company.com => john |
<<%%email-name-part2%%>> |
Email transformed: john.smith@company.com => smith |
<<%%email-name%%>> |
Email transformed: john.smith@company.com => john.smith |
<<%%email-full%%>> |
john.smith@company.com |
<<%%domain-full%%>> |
Domain name transformed: john.smith@my.company.com => my.company.com |
<<%%domain-master%%>> |
Domain name transformed: john.smith@my.company.com => company.com |
<<%%domain-master-no-gtld%%>> |
Domain name transformed: john.smith@my.company.com => company |
<<%%domain-gtld-only%%>> |
Domain name transformed: john.smith@my.company.com => .com |
<<%%copies%%>> |
Number of copies requested e.g. 10 usually used with: @PJL SET COPIES=<<%%copies%%>><0D><0A> or @PJL SET QTY=<<%%copies%%>><0D><0A> |
<<%%color-effects-type%%>> |
"monochrome-grayscale" or "color" depending on job type. Used by Xerox printers in the XPIF header. |
<<%%rendermode%%>> |
"GRAYSCALE" or "COLOR" depending on the job type, usually used with @PJL SET RENDERMODE=<<%%rendermode%%>><0D><0A> |
<<%%planesinuse%%>> |
1 or 3 depending on the mono/color job type, usually used with @PJL SET PLANESINUSE=<<%%planesinuse%%>><0D><0A> |
<0A> |
Linefeed ASCII char |
<0D> |
Carriage return ASCII char |
<1B> |
Escape ASCII char |
<0C> |
Form feed |
<DQ> or <22> |
Double quote ASCII Char (") |
<3C> |
Less than ASCII Char (<) |
<3E> |
Greater than ASCII Char (>) |
<09> |
Tab ASCII Char |
<20> |
Space ASCII Char |