Column width with Generic Text-only Printer



  • I am using Notepad++ in conjunction with a dot-matrix printer (Oki ML1120 eco) which is installed as a Generic Text-only Printer. First I’d like to say Thank you that this is supported at all. It is difficult to find text editors that directly support dot-matrix printers without the ugly bitmap mode (where the text is treated as an image). However, I could not find any settings to change the number of columns for the text which leaves an unneccessary and kinda ugly blank area at the right margin. This issue also occurres with the ordinary Windows 10 notepad and I cannot find any settings to circumvent this. The only way to print with an arbitrary column number I found so far is to use GNU/Linux, fold and lpr in low-level mode (without line breaks introduced by CUPS).

    Is this even supposed to be a Notepad++ setting (or done by the printer driver, perhaps, where I also couldn’t find such setting)? And before you kindly suggest it: There is a reason I use (and in fact bought new in 2021) a dot-matrix printer :)

    I am looking forward for any suggestions or help.



  • @Darius-Runge ,

    I am glad that Notepad++ works for your dot matrix. I don’t think the developers do anything special to support that.

    I don’t know a lot of the behind-the-scenes in modern printing, but Notepad++ presumably shoots text data and font information (font name, size, weight, and color) at the driver, and the Windows printer driver for your printer presumably translates that into the right data for your individual printer.

    My guess is that characters-per-line (ie, page width) is a setting of your printer driver. Actually, it’s probably physical page width, rather than characters-per-line. For example, using the Microsoft Print to PDF driver that I get with MSOffice at work, I printed the same document twice from Notepad++: the first time, I did it in normal portrait orientation, and got about 82 characters of actual text (plus my line numbers in the left margin); I then did a second print in landscape (wide) orientation and got at least 20 more characters per line. So I think the printer driver tells Notepad++ “I have this much width”, and when Notepad++ then sends the data to the printer driver, Notepad++ uses that much width before wrapping the data.

    So, when you use File > Print from Notepad++, instead of immediately hitting Print from the dialog, try the Preferences, and see if you can define a page size that more accurately matches your actual paper size (or the effective paper size that Notepad++ should see to make use of the full width of your printer) – you might have to go into Advanced after choosing Preferences.