I am trying to generate PCL files for an HP printer and my text is getting a strange indentation. For example, if I have code like this:
<esc>%-12345X
<esc>E
<esc>&l2A
line 1
line 2
line 3
<esc>&l1T
<esc>E
<esc>%-12345X
Then I get output like this:
line 1 line 2 line 3
Why is this happening?
This is most likely relates to CR not being sent with LF in the output from your program at the end of each line.
You might look to see what kind of line endings your code will output, LF or CR-LF. You want the latter. On some HP LJ printers, you can go to the Printing settings and the PCL menu, and turn on an "append carriage return to line feed" setting on the printer.