
Chapter 3: Programming Commands 43
Set printing area width
ASCII GS W nL nH
Hexadecimal 1D 57 nL nH
Decimal 29 87 nL nH
Range of nL: 0–255
Range of nH: 0–255
Default: 576 dots (the maximum printable area)
Setsthewidthoftheprintingareauntiltheprinterisinitialized,reset,orpoweredoff.Ifthesettingexceedstheprintable
area,themaximumvalueoftheprintableareaisused.Iftheleftmarginandprintingareasetthewidthtolessthanthe
widthofasinglecharacter,thewidthisextendedotaccommodatethecharacterfortheline.Thewidthoftheprintingarea
issetto((nH X 256)+nL)timeshorizontalmotionunit)inches.Thehorizontalmotionunitsaresetbythesethorizontal
andverticalminimummotionunitscommand(1D50).Ifthehorizontalmotionunitischangedafterchangingprinting
areawidth,theprintingareawidthsettingisnotchanged.
Thewidthoftheprintingareafollowsthesetleftmargincommand(1D4C).Seethesetleftmargincommand(104C…)
earlier in this document for a description.
Formulas
Tosetthewidthoftheprintingareatooneinchatthedefaulthorizontalmotionunitof1/203inches,sendthefour-byte
string:
GS W 203 0
Or,tosetthewidthoftheprintingareatotwoinchesatthedefaulthorizontalmotionunitof1/203unitsperinch,sendthe
four-bytestring:
GS W 150 1
Where2inches=406/203,and406=(1X256)+150.
Exceptions
Thiscommandiseffectiveonlyatthebeginningofaline.
Ifthesettingexceedstheprintablearea,themaximumvalueoftheprintableareaisused.Themaximumprintableareais
576dots.Seetheillustration.
Ifthiscommandisprocessedinpagemode,printingareawidthisnotchangeduntiltheprinterisreturnedtostandard
mode.
Exceptions:
Thecommandiseffectiveonlyatthebeginningofaline.Thiscommandisignoredifthelinebufferisnotempty.
Ifthiscommandisprocessedinpagemode,leftmarginisnotchangeduntiltheprinterisreturnedtostandardmode.
Comentários a estes Manuais