[LINUX] Print from Debian on Pomera DM200

A memo on how to print from Debian on the Pomera DM200 to a network via Wi-Fi with a printer in the network.

It is assumed that Debian is running on Pomera DM200 by referring to the following articles.

-KING JIM Pomera DM200 works with Emacs, Vim, Ruby, and Python! -Note on Linux conversion of pomera DM200 --Qiita

Method overview

--Use CUPS (Common Unix Printing System) to send data to the printer - Common Unix Printing System - Wikipedia --When printing text, use paps to make it PostScript - paps download | SourceForge.net

procedure

Install CUPS and paps

$ sudo apt install cups paps

CUPS test

Launch X, open your browser, and connect to http: // localhost: 631 to bring up the CUPS settings screen.

From here you can add printers and print test pages.

--For the setting method, refer to Nanbu Electronics: Installing the printer on Debian (Linux). --I set it to print on both sides by default. --I also set the default printer, but for some reason this doesn't work in my environment. --There is information on the Internet that you cannot print without installing the printer driver, but at least with my Brother DCP-J978N, I was able to print without the driver (as a minimum PostScript printer). Can the function be used without a driver?). --It couldn't be set with w3m. --If you don't like to use GUI, you can edit the config file. ――Hereafter, it seems that model dependence is large.

Printing English text using CUPS

When printing via CUPS, use the lp command. If it is an English text file, you can print it by sending it with this command as it is.

However, if sample.txt contains characters other than half-width alphanumeric characters, printing may not be possible. This is because the printer may not understand the character code (this depends on the printer).

(Source: Print in binary mode with lpr command- @ IT)

First,

$ lpstat -p

Search for a printer with.

afterwards,

$ lp -d <Printer name> sample.txt

You can print with (<printer name> is the name that appears when you search).

If you have a PDF or Postscript file other than plain text, you can print it in the same way.

Print Japanese text

If you want to print Japanese text (UTF-8), you will need to convert the text to PostScript or PDF before printing.

If you have a strong document, you can typeset it with LaTeX and convert it to PDF, but in this case it is difficult because you need to install LaTeX of several GB. Here, I will introduce how to easily convert plain text to PostScript and print it with software called paps.

How to use

$ paps --header --font="TakaoMincho 9" input.txt > output.ps

(Option means "with header" and "specify 9 points of Takao Mincho"). The ps file generated by this,

$ lp -d <Printer name> output.ps

If you send it to the printer as, it will be printed.

--If you use LaTeX, please refer to Note: Pandoc + LaTeX to easily output Japanese PDF --Qiita. to invite. --There are several tools other than paps that perform text-> ps conversion. Blog to write something: Japanese text written in UTF-8, how to convert a text file to PostScript (2019/11) ). The GitLab version of gnome-u2ps couldn't be built as it is, but it could be built by adding the -lm option to gcc in the Makefile. ――When I converted it to PDF with ps2pdf and then printed it, nothing seemed to change.

that's all

I think it's quite convenient to be able to print the text entered in Pomera directly without going through a personal computer.

I feel like this is a word processor, but ...

Recommended Posts

Print from Debian on Pomera DM200
Linux on Windows -1-: debian introduction