Printer Configuration File¶
The configuration file contains the keyword value pairs corresponding to the printer tables in MongoDB. The name of the file is specified when exporting with PLOSSYS CLI. The file format is YAML.
Example - printer configuration file
- printer: P50-ROE-HP2055-001
connection: 'socket://10.49.31.5:9100'
config: hp.laserjet_pcl_5
adjustStapleType: true
adjustPunchType: true
rotateLandscapeA3: false
pickup: false
template:
timeout: 2m
params:
- '-dBATCH'
- '-dNOPAUSE'
- '-dQUIET'
- '-dSAFER'
- '-sstdout=%stderr'
- '-sDEVICE=ijs'
- '-r600'
- '-sIjsParams=ResourceDir=${ijsPath}/hppcl,PrintOptions=${printOptions}'
- '-sIjsServer=${ijsPath}/hppcl/ijs_server_hppcl'
- '-dBitsPerSample=1'
- '-sProcessColorModel=DeviceGray'
- '-sOutputFile=-'
- '-dIjsUseOutputFD'
- '-'
gyros:
- name: Prepare Finishing
context: startJob
rules:
- condition: true
action:
function: >
var stapleTypes = ['oneupleft', 'twoleft', 'onebottomleft',
'twobottom', 'onebottomright', 'tworight', 'oneupright',
'twoup'];
var punchTypes = ['left', 'fourleft', 'bottom', 'fourbottom',
'right', 'fourright', 'top', 'fourtop'];
job.low.origStapleType = job.low.STAPLE_TYPE;
job.low.origPunchType = job.low.PUNCH_TYPE;
if (job.low.STAPLE === "n") { job.low.STAPLE_TYPE = "nostaple";
}
job.sealStapleType = stapleTypes.indexOf(job.low.STAPLE_TYPE);
job.sealPunchType = punchTypes.indexOf(job.low.PUNCH_TYPE);
job.sealLegacyPunchType = Math.floor(job.sealPunchType / 2);
if (job.page.ORIENTATION === "landscape" &&
printer.rotateLandscapeA3 && (job.page.MEDIANAME === "a3" ||
job.page.MEDIANAME == "ansib"))
{
if (job.sealStapleType != -1)
{
job.sealStapleType = (job.sealStapleType + 6) % 8;
}
if (job.sealPunchType != -1)
{
job.sealPunchType = (job.sealPunchType + 6) % 8;
}
}
else if (job.page.ORIENTATION === "landscape")
{
if (job.sealStapleType != -1)
{
job.sealStapleType = (job.sealStapleType + 2) % 8;
}
if (job.sealPunchType != -1)
{
job.sealPunchType = (job.sealPunchType + 2) % 8;
}
}
job.low.adjustedStapleType = stapleTypes[job.sealStapleType] ?
stapleTypes[job.sealStapleType] : job.low.STAPLE_TYPE;
job.low.adjustedPunchType = punchTypes[job.sealPunchType] ?
punchTypes[job.sealPunchType] : job.low.PUNCH_TYPE;
if (printer.adjustStapleType)
{
job.low.STAPLE_TYPE = job.low.adjustedStapleType;
}
if (printer.adjustPunchType)
{
job.low.PUNCH_TYPE = job.low.adjustedPunchType;
job.sealLegacyPunchType = Math.floor(job.sealPunchType / 2);
}
job.sealPunchHoles = /four/.exec(job.low.PUNCH_TYPE) ? 4 : 2;
return '';
- name: Assign PLOTPAPER
context: startPage
rules:
- condition: job.PAGENO === 1
action:
function: |
job.p4ToP5 =
{
db:'color',
fo:'transparency',
pa:'plain',
li:'thin',
tr:'vellum',
sp1:'letterhead',
sp2:'preprinted',
sp3:'labels',
sp4:'bond',
sp5:'recycled',
sp6:'prepunched',
sp7:'cardstock',
sp8:'envelope',
sp9:'rough',
sp10:'thick',
sp11:'coated',
sp12:'highquality'
};
if (job.p4ToP5[job.low.PLOTPAPER])
{
job.page.TRAY = job.p4ToP5[job.low.PLOTPAPER];
}
return '';
- name: HP Set sealRotate
context: startJob
rules:
- condition: >-
/(onebottomright|twobottom|onebottomleft|tworight)/.exec(job.low.STAPLE_TYPE)
|| /right/.exec(job.low.PUNCH_TYPE) || (job.low.PUNCH_TYPE ===
"fourbottom" && /(a3|ansib)/.exec(job.page.MEDIANAME))
action:
function: |
job.sealRotate = true;
return '';
- name: Job Start UEL + Jobname + Username
context: startJob
prefix: Init=
rules:
- condition: true
action: |
Init=\\033%-12345X@PJL JOB NAME="${job.JOBNAME}"\\n
Init=@PJL SET JOBNAME="${job.JOBNAME}"\\n
Init=@PJL SET USERNAME="${job.USERNAME}"\\n
- name: PJL QTY Job Start
context: startJob
prefix: Init=
rules:
- condition: true
action: |
Init=@PJL SET QTY=${+(job.PLOTCOPY || 0)+1}\\n
- name: HP Username for Accounting
context: startJob
prefix: Init=
rules:
- condition: true
action: |
Init=@PJL SET JOBATTR="JobAcct1=${job.USERNAME}"\\n
- name: PJL Disable WIDEA4/EDGETOEDGE
context: startJob
prefix: Init=
rules:
- condition: true
action: |
Init=@PJL SET WIDEA4=NO\\n
Init=@PJL SET EDGETOEDGE=NO\\n
- name: HP PJL Outbin
context: startJob
prefix: Init=
rules:
- condition: job.low.SORT_TYPE === "center"
action: |
Init=@PJL SET OUTBIN=UPPER\\n
- condition: >-
job.low.SORT_TYPE === "sideupper" || job.low.SORT_TYPE === "upper"
|| job.low.SORT_TYPE === "left"
action: |
Init=@PJL SET OUTBIN=LEFT\\n
- condition: job.low.SORT_TYPE === "mailbox1"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN1\\n
- condition: job.low.SORT_TYPE === "mailbox2"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN2\\n
- condition: job.low.SORT_TYPE === "mailbox3"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN3\\n
- condition: job.low.SORT_TYPE === "mailbox4"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN4\\n
- condition: job.low.SORT_TYPE === "mailbox5"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN5\\n
- condition: job.low.SORT_TYPE === "mailbox6"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN6\\n
- condition: job.low.SORT_TYPE === "mailbox7"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN7\\n
- condition: job.low.SORT_TYPE === "mailbox8"
action: |
Init=@PJL SET OUTBIN=OPTIONALOUTBIN8\\n
- name: HP PJL STAPLE
context: startJob
prefix: Init=
rules:
- condition: >-
(job.low.STAPLE === "n" && job.low.BOOKLET === "n") ||
(job.low.STAPLE === "n" && !job.low.BOOKLET)
action: ''
- condition: job.low.BOOKLET === "y" || job.low.STAPLE_TYPE === "booklet"
action: |
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="BOOKLET_MAKER"\\n
Init=@PJL SET PROCESSINGOPTION="BOOKLET_MAKER"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: job.low.STAPLE === "n"
action: ''
- condition: >-
(job.low.STAPLE === "y" && !job.low.STAPLE_TYPE) ||
job.low.STAPLE_TYPE === "oneupleft" || job.low.STAPLE_TYPE ===
"onebottomright"
action: |
Init=@PJL SET FINISH=STAPLE\\n
Init=@PJL SET STAPLEOPTION=ONE\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="STAPLING"\\n
Init=@PJL SET PROCESSINGOPTION="LEFT_1PT_ANGLED"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: >-
job.low.STAPLE_TYPE === "twoleft" || job.low.STAPLE_TYPE ===
"tworight"
action: |
Init=@PJL SET FINISH=STAPLE\\n
Init=@PJL SET STAPLEOPTION=TWO\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="STAPLING"\\n
Init=@PJL SET PROCESSINGOPTION="LEFT_2PT"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: >-
job.low.STAPLE_TYPE === "oneupright" || job.low.STAPLE_TYPE ===
"onebottomleft"
action: |
Init=@PJL SET FINISH=STAPLE\\n
Init=@PJL SET STAPLEOPTION=ONEOPPOSED\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="STAPLING"\\n
Init=@PJL SET PROCESSINGOPTION="RIGHT_1PT"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: >-
(job.page.MEDIANAME === "a3" || job.page.MEDIANAME == "ansib") &&
(job.low.STAPLE_TYPE === "twoup" || job.low.STAPLE_TYPE ===
"twobottom")
action: |
Init=@PJL SET FINISH=STAPLE\\n
Init=@PJL SET STAPLEOPTION=ONEOPPOSED\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="STAPLING"\\n
Init=@PJL SET PROCESSINGOPTION="TWO_STAPLES"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: >-
job.low.STAPLE_TYPE === "twoup" || job.low.STAPLE_TYPE ===
"twobottom"
action: |
Init=@PJL SET FINISH=STAPLE\\n
Init=@PJL SET STAPLEOPTION=ONEOPPOSED\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="STAPLING"\\n
Init=@PJL SET PROCESSINGOPTION="TOP_2PT"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- name: HP PJL Punch
context: startJob
prefix: Init=
rules:
- condition: job.low.PUNCH === "n"
action: ''
- condition: >-
(job.low.PUNCH === "y" && !job.low.PUNCH_TYPE) ||
job.low.PUNCH_TYPE === "left"
action: |
Init=@PJL SET PUNCH=ON\\n
Init=@PJL SET PUNCH-NUMBER=TWO\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="PUNCH"\\n
Init=@PJL SET PROCESSINGOPTION="LEFT_2PT_DIN"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: >-
((job.page.MEDIANAME === "a3" || job.page.MEDIANAME === "ansib")
&& (job.low.PUNCH_TYPE === "bottom" || job.low.PUNCH_TYPE ===
"top")) || job.low.PUNCH_TYPE === "right"
action: |
Init=@PJL SET PUNCH=ON\\n
Init=@PJL SET PUNCH-NUMBER=TWO\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="PUNCH"\\n
Init=@PJL SET PROCESSINGOPTION="2PT_DIN"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: job.low.PUNCH_TYPE === "bottom"
action: |
Init=@PJL SET PUNCH=ON\\n
Init=@PJL SET PUNCH-NUMBER=TWO\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="PUNCH"\\n
Init=@PJL SET PROCESSINGOPTION="BT_2PT_DIN"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: job.low.PUNCH_TYPE === "top"
action: |
Init=@PJL SET PUNCH=ON\\n
Init=@PJL SET PUNCH-NUMBER=TWO\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="PUNCH"\\n
Init=@PJL SET PROCESSINGOPTION="TOP_2PT_DIN"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- condition: >-
(/(a4|ansia)/.exec(job.page.MEDIANAME) &&
/(fourleft|fourright)/.exec(job.low.PUNCH_TYPE)) ||
(/(a3|ansib)/.exec(job.page.MEDIANAME) &&
/(fourtop|fourbottom)/.exec(job.low.PUNCH_TYPE))
action: |
Init=@PJL SET PUNCH=ON\\n
Init=@PJL SET PUNCH-NUMBER=TWO\\n
Init=@PJL SET PROCESSINGACTION=APPEND\\n
Init=@PJL SET PROCESSINGTYPE="PUNCH"\\n
Init=@PJL SET PROCESSINGOPTION="4PT_DIN"\\n
Init=@PJL SET PROCESSINGBOUNDARY=MOPY\\n
- name: HP PJL Ecomode
context: startJob
prefix: Init=
rules:
- condition: job.low.ECOMODE === "y"
action: |
Init=@PJL SET ECONOMODE=ON\\n
- condition: job.low.ECOMODE === "n"
action: |
Init=@PJL SET ECONOMODE=OFF\\n
- name: HP PJL Secure Print
context: startJob
prefix: Init=
rules:
- condition: job.low.ENABLE_SECUREPRINT === "n" || !job.low.SECUREPRINT
action: |
Init=@PJL SET HOLD=OFF\\n
- condition: job.low.ENABLE_SECUREPRINT === "y" || !job.low.ENABLE_SECUREPRINT
action: |
Init=@PJL SET HOLD=ON\\n
Init=@PJL SET HOLDTYPE=PRIVATE\\n
Init=@PJL SET HOLDKEY="${job.SECUREPRINT}"\\n
- name: PJL Enter Language PCL 5 Job Start
context: startJob
prefix: Init=
rules:
- condition: true
action: |
Init=@PJL ENTER LANGUAGE=PCL\\n\\r\\033E
- name: PCL 5 Duplex
context: startJob
prefix: PageSetup_1=
rules:
- condition: job.low.DUPLEX === "none"
action: |
PageSetup_1=SIMPLEX\\033&l0S
- condition: job.low.DUPLEX === "long_side"
action: |
PageSetup_1=DUPLEX\\033&l1S
- condition: job.low.DUPLEX === "short_side"
action: |
PageSetup_1=DUPLEX_TUMBLE\\033&l2S
- name: HP PCL Intray
context: startPage
prefix: 'PageSetup_${job.PAGENO}='
rules:
- condition: >-
job.page.TRAY === "intraymanual" && job.page.LASTTRAY !==
"intraymanual"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&l2H
- condition: >-
job.page.TRAY === "intrayauto" && job.page.LASTTRAY !==
"intrayauto"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&l7H
- condition: job.page.TRAY === "intray1" && job.page.LASTTRAY !== "intray1"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&l1H
- condition: job.page.TRAY === "intray2" && job.page.LASTTRAY !== "intray2"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&l5H
- condition: job.page.TRAY === "intray3" && job.page.LASTTRAY !== "intray3"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&l8H
- condition: job.page.TRAY === "intray4" && job.page.LASTTRAY !== "intray4"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&l9H
- condition: job.page.TRAY === "intray5" && job.page.LASTTRAY !== "intray5"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&l10H
- name: HP PCL Intray Media
context: startPage
prefix: 'PageSetup_${job.PAGENO}='
rules:
- condition: job.page.TRAY === "color" && job.page.LASTTRAY !== "color"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n6WdColor
- condition: >-
job.page.TRAY === "transparency" && job.page.LASTTRAY !==
"transparency"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n13WdTransparency
- condition: >-
(job.page.TRAY === "plain" && job.page.LASTTRAY !== "plain") ||
(job.page.TRAY === "paper" && job.page.LASTTRAY !== "paper")
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n6WdPlain
- condition: job.page.TRAY === "thin" && job.page.LASTTRAY !== "thin"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n6WdLight
- condition: job.page.TRAY === "vellum" && job.page.LASTTRAY !== "vellum"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n7WdVellum
- condition: >-
job.page.TRAY === "letterhead" && job.page.LASTTRAY !==
"letterhead"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n11WdLetterhead
- condition: >-
job.page.TRAY === "preprinted" && job.page.LASTTRAY !==
"preprinted"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n11WdPreprinted
- condition: job.page.TRAY === "labels" && job.page.LASTTRAY !== "labels"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n7WdLabels
- condition: job.page.TRAY === "bond" && job.page.LASTTRAY !== "bond"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n5WdBond
- condition: job.page.TRAY === "recycled" && job.page.LASTTRAY !== "recycled"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n9WdRecycled
- condition: >-
job.page.TRAY === "prepunched" && job.page.LASTTRAY !==
"prepunched"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n11WdPrepunched
- condition: job.page.TRAY === "cardstock" && job.page.LASTTRAY !== "cardstock"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n11WdCard Stock
- condition: job.page.TRAY === "envelope" && job.page.LASTTRAY !== "envelope"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n9WdEnvelope
- condition: job.page.TRAY === "rough" && job.page.LASTTRAY !== "rough"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n6WdRough
- condition: job.page.TRAY === "thick" && job.page.LASTTRAY !== "thick"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n6WdHeavy
- condition: job.page.TRAY === "coated" && job.page.LASTTRAY !== "coated"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n6WdGloss
- condition: >-
job.page.TRAY === "highquality" && job.page.LASTTRAY !==
"highquality"
action: |
PageSetup_${job.PAGENO}=FRONT\\033&n6WdPlain
- name: Job End UEL
context: endJob
prefix: Exit=
rules:
- condition: true
action: |
Exit=\\033%-12345X@PJL EOJ\\n\\033%-12345X
- name: PCL 5 sealRotate
context: startPage
prefix: 'PageSetup_${job.PAGENO}='
rules:
- condition: >-
job.sealRotate && /(ansia|legal|ansib)/.exec(job.page.MEDIANAME)
&& job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l2o180u0l0E
- condition: job.sealRotate && job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l2o170u0l0E
- condition: >-
job.sealRotate && /(ansia|legal|ansib)/.exec(job.page.MEDIANAME)
&& !job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l2o-180u0l0E
- condition: job.sealRotate && !job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l2o-170u0l0E
- name: PCL 5 Rotate A3 Landscape
context: startPage
prefix: 'PageSetup_${job.PAGENO}='
rules:
- condition: >-
job.sealRotate && printer.rotateLandscapeA3 && job.page.MEDIANAME
=== "a3" && job.page.ORIENTATION === "landscape" &&
job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l0o170u0l0E
- condition: >-
printer.rotateLandscapeA3 && job.page.MEDIANAME === "a3" &&
job.page.ORIENTATION === "landscape" && job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l2o170u0l0E
- condition: >-
job.sealRotate && printer.rotateLandscapeA3 && job.page.MEDIANAME
=== "ansib" && job.page.ORIENTATION === "landscape" &&
job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l0o180u0l0E
- condition: >-
printer.rotateLandscapeA3 && job.page.MEDIANAME === "ansib" &&
job.page.ORIENTATION === "landscape" && job.page.FRONTSIDE
action: |
PageSetup_${job.PAGENO}=\\033&l2o180u0l0E
- condition: >-
job.sealRotate && printer.rotateLandscapeA3 && job.page.MEDIANAME
=== "a3" && job.page.ORIENTATION === "landscape" && !job.frontside
action: |
PageSetup_${job.PAGENO}=\\033&l0o-170u0l0E
- condition: >-
printer.rotateLandscapeA3 && job.page.MEDIANAME === "a3" &&
job.page.ORIENTATION === "landscape" && !job.frontside
action: |
PageSetup_${job.PAGENO}=\\033&l2o-170u0l0E
- condition: >-
job.sealRotate && printer.rotateLandscapeA3 && job.page.MEDIANAME
=== "ansib" && job.page.ORIENTATION === "landscape" &&
!job.frontside
action: |
PageSetup_${job.PAGENO}=\\033&l2o-180u0l0E
- condition: >-
printer.rotateLandscapeA3 && job.page.MEDIANAME === "ansib" &&
job.page.ORIENTATION === "landscape" && !job.frontside
action: |
PageSetup_${job.PAGENO}=\\033&l2o-180u0l0E
type:
name: HP LaserJet 2100
manufacturer: HP
model: LaserJet 2100
pdl:
name: pcl
version: '5'
webUrl: 'http://10.49.31.5'