This GPD code given below is taken from the ddk sample -
hplj5.gpd

*PrintableArea: PAIR(9600, 12720)
*PrintableOrigin: PAIR(300, 220)
*CursorOrigin: PAIR(300, 220)
*Command: CmdSelect
{
*Order: DOC_SETUP.12
*Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t5760x7656Y"
}

my questions are:

1. What commands does *PrintableArea, *PrintableOrigin and
*CursorOrigin insert into the PCL stream ?

2. The printable area length according to calculation
should have been 12760 (13200 - 220 - 220), but here it is
only 12720 , where did the 40 units go?


3.I had created a GPD for my printer, letter paper size
portrait mode values are as follows,

*PrintableArea:PAIR(9800, 12800)
*PrintableOrigin: PAIR(200, 200)
*CursorOrigin: PAIR(200, 200)
*Command: CmdSelect
{
*Order: DOC_SETUP.21
*Cmd: "<1B>&l2a8c1e-50U"
}

When tested with WHQL tool the rectangle did not have the
right side. When I changed the *PrintableArea to
*PrintableArea:PAIR(9799, 12800) it started working fine.
These measures are in terms of 1/1200 of an inch, how did
that 1 unit make the difference ?

Note:I have "-50U" as part of the command to left offset
the margin by 50 units i.e. my printers left margin starts
at 1/6 of an inch, since the default left margin in PCL is
1/4 of an inch I am adding this left offset command.