ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Set margins on PCL printer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set margins on PCL printer

    I need to set the margins on a PCL printer so that the printable area is as wide as possible. I have tried sending the PCL commands to set the left and right margins as two fields at the top of my printer file DDS. The first field is '1B2661014C' to set the left margin at column1, the second field is '1B2661504D' to set the right margin at column 80. These data are not being interpreted as PCL commands, but are printing at the top of the page. Am I using the wrong control string? Am I wrong in thinking I can imbed control data in my print stream? Thanks for you help.

  • #2
    The PCL needs to be preceded by the ASCII transparency character X'03' and the length of the ASCII string.

    Your first example '1B2661014C' is five bytes long, so the complete string would be x'03051B2661014C'

    Comment

    Working...
    X