7

Retro printer day: I have an old IbmPro compatible dot matrix printer connected by a USB parallel adapter to my Ubuntu 20.04 system. It works great! One major trick in setting it up: set the URI to /dev/usb/lp0 and make sure the lp user is in the right group to write to that dev. That took me a while to figure out. I use the IBMPro generic printer driver and it's great. Other critical hints: 9600 baud, 8 bits, no stop bit, hardware flow control.

The one remaining problem: the print area is offset about 0.5" to the left. I'm sure I know what's going on: the tractor feed area is about 0.5" and so I need to somehow indicate, don't count the tractor feed area within the page margin. In other words, the full page width is about 9.5" but only print 8.5" of that and offset it 0.5" to the right.

I've tried editing the PPD file including changing the values in HWMargins and ParamCustomPageSize WidthOffset. None of this seems to have any impact. I've read a bunch of documentation about PPD files and it's just not clear what to do. I guess I could set up a custom paper size of 9.5" width but I would prefer to just have all my documents be the same and print correctly by offsetting everything as it's generating printer output.

There must be a simple setting for this.

Edit: tried a lot more things including: Go to Printer Properties and go to Job Options. There's a left margin setting. I set it to 36 points, or half an inch, and that moved printing over. Adjust as desired. But that didn't work. I also tried to make this change in the PPD:

ImageableArea Letter/US Letter: "18 36 612 756"

and that didn't work.

user2959589
  • 362
  • 1
  • 9
  • 23
  • I've encountered similar problem with Epson's Dot Matrix bill printers. I've played around with CUPS printer's default options > printer settings > resolution & max band width. Playing around with these, I've managed to scale the print to the paper size without unwanted margins. – ΔO 'delta zero' Jun 23 '20 at 12:28

1 Answers1

0

It is fixed. The order of parameters for the gs line in the PPD must be just right and it's not obvious how to get it working. After much trial and error, this line works:

*FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE &&                                                                         
-dNOMEDIAATTRS -dNOINTERPOLATE -sDEVICE=ibmpro%A%Z &&                                                                                                
-sOutputFile=- &&                                                                                                                                    
-c "<</PageOffset [36 0]>> setpagedevice" -f -"

It must be in exactly that order. Adjust the offset values (36 for the horizontal offset, 0 for vertical, in this case) as needed. This really should have been easier, given that it's going to be quite normal to adjust offsets on any dot matrix printer. I hope this question is useful for anyone else in this situation. Yes do pay attention to the HTML escapes used in the line above, they are correct. I tried before using ' and that didn't work. It must be ".

This was really a lot of effort to figure out although would probably be obvoius to someone experienced in PPD files.

user2959589
  • 362
  • 1
  • 9
  • 23