# How to add a printer?



## TomHsiung (Feb 8, 2018)

I installed the CUPS service and I could login the web interface to manage printers. But I did not find the model of my printer.

My printer has ethernet card and wireless card. However, I was not able to use WiFi because the my home WLAN uses 5G and the printer's wirelsss card dosen't support 5G.







Tom


----------



## SirDice (Feb 8, 2018)

https://www.freebsd.org/doc/en_US.ISO8859-1/articles/cups/index.html


----------



## TomHsiung (Feb 8, 2018)

I installed the gutenprint packages but still no my printer.

PS: after installation of gutenprint the cups service had been restarted.

Tom


----------



## TomHsiung (Feb 8, 2018)

Some thing is wrong.


```
[admin@Toms-Server ~/pdfs_to_print]$ lpstat -t

scheduler is running

system default destination: FX_DocuPrint_P268_dw

device for FX_DocuPrint_P268_dw: lpd://BRN3C2AF40F58E0/BINARY_P1

FX_DocuPrint_P268_dw accepting requests since Thu Feb  8 23:37:02 2018

printer FX_DocuPrint_P268_dw is idle.  enabled since Thu Feb  8 23:37:02 2018

[admin@Toms-Server ~/pdfs_to_print]$ lpr nutrients*.pdf

lpr: lp: unknown printer

[admin@Toms-Server ~/pdfs_to_print]$
```


----------



## SirDice (Feb 8, 2018)

lpr(1)/lpd(8) and CUPS are two different printing systems.


----------



## TomHsiung (Feb 8, 2018)

So which syntax should I use?


----------



## TomHsiung (Feb 8, 2018)

It is likely that this issue of “unknown printer” was caused by driver mismatch. I have tried the `lpr` syntax on my Mac and it worked perfectly. Mac has built-in CUPS service and I checked the cups web interface settings, that the model list did include my printer. In contrast, the settings of FreeBSD did not contain the model of my printer. I think this is the cause.


----------



## shepper (Feb 8, 2018)

For what ever reason, the specifications for a Fuji-Xerox p268 are not available/accessible for US internet users.  That specific model is also not in the OpenPrinting DataBase.

If the OP has access, please post the "Printer Languages" from the manual.  They are usually "PostScript" or "PCL6" or "GDI".  If it is Postscript or PCL6, it can be made to work.


----------



## TomHsiung (Feb 9, 2018)

What is OP and what info do you need?


----------



## shepper (Feb 9, 2018)

OP = Original Post = TomHsiung

On this web page, for a different model, it lists the Print Language as PCL6.  The info needed is what the Print Language is for a p268.

Edit:  Most of the Fuji-Xerox printers in that product line (p225 - p265) support PCL6.  Some also support Postscript.  Postscript would be the preferred ppd to use with cups as it usually provides more fonts and processes the print job faster.  The documentation on the p268 is all in Chinese and not friendly with Google Translate - I do not read chinese.

print/ghostscript9-agpl-base provides a PCL6 compatible driver (plxmono/ljet4) that can be set up for page size a4.  Once a ppd is generated for your printer and placed in the ppd directory, it should be easy to set up in cups.


----------



## TomHsiung (Feb 10, 2018)

It's GDI, PCL6 (only P268d/dw).






Tom


----------



## TomHsiung (Feb 10, 2018)

And so just to install by print/ghostscript9-agpl-base `pkg install ghostscript9-agpl-base` and then what to do next? Thanks.

Tom


----------



## shepper (Feb 10, 2018)

You can use either the ljet4 (600x600dpi) or pxlmono (1200x1200dpi) drivers supplied by Ghostscript.  You may already have it in the FreeBSD cups web interface under HP or GENERIC - select one that indicates pxlmono or ljet4.
A generic pxlmono.ppd is in the print/cups-filters package which may have been installed as a cups dependency.

If not you can generate the ppd either online at OpenPrinting, (here is the generic pxlmono ppd) or using print/foomatic-db-engines.

I would probably test with a generic pxlmono driver and if successful, generate a custom p268 ppd based on pxlmono.  This ppd could be used in linux or BSD going forward.  The ppd has lines that can be edited to set the default papersize, resolution, duplex, etc.

You can also use the pxlmono driver in the base lpd printing system as described in Chapter 9.    How to set up may be available with Translation.


----------



## scottro (Feb 10, 2018)

As for`lpr` and `lp`, if you are using cups, then you want /usr/local/bin/lpr.

The `lpr` and `lp` commands are in the base system in /usr/bin,whereas cups versions of the commands are in /usr/local/bin as it's 3rd party software.

wblock@ has a nice page on using the builtin commands including converting the file to be printed to postscript 
http://www.wonkity.com/~wblock/docs/html/lpdprinting.html


----------



## TomHsiung (Feb 10, 2018)

shepper said:


> You can use either the ljet4 (600x600dpi) or pxlmono (1200x1200dpi) drivers supplied by Ghostscript.  You may already have it in the FreeBSD cups web interface under HP or GENERIC - select one that indicates pxlmono or ljet4.
> A generic pxlmono.ppd is in the print/cups-filters package which may have been installed as a cups dependency.
> 
> If not you can generate the ppd either online at OpenPrinting, (here is the generic pxlmono ppd) or using print/foomatic-db-engines.
> ...



I have added the DocuPrint P268 dw to OpenPrinting, please add the ppd file. Thank you for your help.


----------



## shepper (Feb 10, 2018)

TomHsiung said:


> I have added the DocuPrint P268 dw to OpenPrinting, please add the ppd file.



Thanks for trying to contribute back.  The OpenPrinting website is separate from FreeBSD, we are not able to add the ppd on that web site.

If you post what worked for you, it will come up in forum searches for future users with the DocuPrint P268 dw.

Edit:  I may have not understood.  If you need the ppd download this link: pxlmono.ppd.

If it works, post back and we can give you instructions on how to generate a pxlmono based ppd for your specific printer.


----------

