printing from 13.0

So I was on 12.2 only very briefly with this system before discovering that my new hardware required 13.0 in order to run Xorg.

But I could have sworn that lpt0 was recognized under 12.2. Under 13.0, it is not. No ppbus0 at all.
(E.g. /dev/lpt0 does not exist, not in dmesg, etc.)

So I thought, well, I can get with the 21st century and use USB, and indeed it's promptly recognized:
Code:
Oct 11 15:37:16 pangkur kernel: ugen0.2: <Hewlett-Packard hp LaserJet 1320 series> at usbus0
Oct 11 15:37:16 pangkur kernel: ulpt0 on uhub0
Oct 11 15:37:16 pangkur kernel: ulpt0: <Hewlett-Packard hp LaserJet 1320 series, class 0/0, rev 1.10/1.00, addr 1> on usbus0
Oct 11 15:37:16 pangkur kernel: ulpt0: using bi-directional mode
And then /etc/printcap (where I just add the 'u' in front of lpt0 from my old printcap that worked in earlier versions):
Code:
lp|local line printer:\
        🇸🇭\
        :lp=/dev/ulpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
So what happens?

Well, this is a postscript printer, but it seems I can't get e.g. firefox or xpdf to generate postscript anymore! All they offer me is PDF files, and then there's no way to print a PDF. (If I try with 'lpr' directly, I get many pages of gibberish.)

At first I thought my printer wasn't working right, or I was doing something wrong, but now I'm realizing that ways to generate postscript are disappearing. There's no pdf2ps anymore either, etc.

So I'm confused. What is going on?
 
For a HP IP printer i installed the following packages,
Code:
hplip-3.20.6                   Drivers and utilities for HP printers and All-in-One devices
foomatic-db-20210822           Database for integrating printer drivers with common spoolers
foomatic-db-engine-4.0.13,2    Foomatic database engine
foomatic-db-hpijs-1.4          Foomatic data for the HPIJS printer drivers
cups-2.3.3op2                  Common UNIX Printing System
cups-filters-1.28.10           Additional backends, filters and other software for CUPS
cups-pdf-3.0.1_1               Virtual printer for CUPS to produce PDF files
 
Are you saying that you can directly print a PDF with those packages?

As far as the printer itself, I have been using it on FreeBSD for decades. Until now, with 13.0. (Still, though, I can print e.g. an ASCII file with a2ps. But no useful output from xpdf, firefox, etc. Only PDF!)
 
Further update. So instead of the default xpdf package, I remembered there is xpdf3. I installed that, and it has a "print" button. (Note the default xpdf has no "print" button!) And xpdf3 will write postscript (.ps), which my printer understands.

So I still don't understand, but I can now print a pdf (& so a web page, etc.).
 
The lpt(4) device is supported in the GENERIC kernel. It would help to know a little more about your lpt0. Do you actually have a physical parallel port on both devices?
When using a PostScript printer, the lpr/lpd system needs filters to convert your input to PostScript. See the handbook.

A common alternative is to install the print/cups package. Then download the HPLIP tar package and extract the specific ppd file for your HP printer model into the directory /usr/local/etc/cups/ppd/. Then configure CUPS to use it. CUPS will auto-detect the input type and do what's required.

Cups and lpr/lpd do not play together nicely. Cups installs binaries in the /usr/local tree with the same names as the original lpr/lpd (lpr, lpq, and lprm) utilities. All cups utilities have System V equivalent names (e.g. lp, lpadmin, lpstat, and cancel). Anyone using cups on FreeBSD should consider using them exclusively (since lpr/lpd is part of the base system and cant be easily removed).

The pdf2ps utility is installed with any of the ghostscript ports you may choose to install:
Code:
$ find /usr/ports -type f -name pkg-plist -exec grep -i -l pdf2ps {} \;
/usr/ports/print/ghostscript7-base/pkg-plist
/usr/ports/print/ghostscript9-agpl-base/pkg-plist
/usr/ports/print/ghostscript8-base/pkg-plist
/usr/ports/print/ghostscript9-base/pkg-plist
 
Yes, I have a parallel port on both devices. As I said, this is new hardware, except the printer, which I have used successfully with FreeBSD (lpd/lpr system) since the 90s. And I thought that 12.2 recognized lpt0, but perhaps I have that wrong. It definitely worked fine in my 10.x system being replaced.
 
But I also see what everyone is saying in that e.g. firefox tries to use cups, and that is what is giving me only PDF as an option. I would be happy if it would just let me write to .ps & then I print the file directly myself....

These are really two separate issues to do with printing, about the apps & formats, and about the hardware detection.
 
As noted, the xpdf3 package will also print directly to a postscript printer like mine. It comes with a similar "pdftops" utility. However, both xpdf3 & ghostscript are on their way out. (I used to install & use gs as a filter back in the days *before* I had a postscript printer. Its main purpose is to read postscript.)
 
Maybe I should ask a different question. What sort of input does a contemporary printer expect? Not postscript? Perhaps that explains my situation.
 
However, both xpdf3 & ghostscript are on their way out.
I don't understand why you think ghostscript is on the way out...

Like you, I ran lpr/lpd to my HP4050n for decades. It was set up to spool and print PostScript. It required a small filter for lpd to connect over the network. I had a collection of applications like graphics/xpdf, print/enscript-a4, and print/psutils that I used to manually convert various inputs to PostScript, prior to sending them to the printer.

The problem with PostScript is that it's not a static target. There are various levels and quirks that will prevent many forms of "postscript" from printing on your specific printer. My main problem was that the HP4050n is limited to Level 2 PostScript. It does not support Level 3. I frequently had problems printing "postscript" documents, and would have to manually convert them, sometimes to Level 1 (essentially bitmap), and that would fail to print for other reasons (huge files, 10MHz Ethernet, limited internal memory).

The reason I recommended the ppd files form the HPLIP tar package is because they are produced by HP who also make the printers and write the firmware. The ppd files manage the quirks and Level differences, and do work, extremely well. Since I switched to CUPS with the HP ppd file, it's acutely rare for me to have a problem printing anything.

For the sake of completeness I should add that there is a FreeBSD print/hplip port available (the HPLIP tar package mentioned above with FreeBSD patches applied). The package description says "HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.". I have never used it (except to purloin the ppd files), but expect it may be a competent alternative to CUPS.

Edit: I never really wanted CUPS, but it's a dependency of so many things in the ports tree that it is frequently dragged in. So I surrendered, and tried it out. I'm now happy that I did.
 
OK, "surrender to cups" ... will put that on the possible to-do list. :)

(You are right that not everything has printed perfectly over the years, but it's managed e.g. airline tickets, so I've been satisfied.)
 
OK, "surrender to cups" ... will put that on the possible to-do list. :)

(You are right that not everything has printed perfectly over the years, but it's managed e.g. airline tickets, so I've been satisfied.)
If you want an airline ticket these days, use the airline's app on your phone. No more fumbling around for crumpled paper in your pockets while trying to hold a suitcase while standing in line for a TSA inspection. :p
 
… instead of the default graphics/xpdf package, I remembered there is graphics/xpdf3. I installed that, and it has a "print" button. …

Versions 3.04_11 and 4.03_1,1, pictured:

1649658137343.png 1649658664545.png 1649658808951.png
 
well I run FreeBSD 10 12 13 normally I'm using FreeBSD 12 running xorg in great shape this week a lot of updates came out
 
You can use pdf2ps (from ghostscript). cups can be handy but you don't have to use it as it will be one more thing you have to configure! From firefox you can just create a pdf file and then pipe it through pdf2ps before handing it to lpr.

No idea why /dev/lpt0 doesn't come up.
 
[...] cups can be handy but you don't have to use it as it will be one more thing you have to configure! [...]
I suspect CUPS is fairly robust. Device independent postscript laser printing has been around for decades from the beginning.

20 yrs ago I used CUPS on mac mini "thin client" to talk to ethernet Samsung laser printer which wasn't "supported" and driven by RDP printer redirection. It was pretty simple to follow the directions and operated with no issues forever. (But the techs we had trying to replicate the setup managed to nuke MacOS and had to reinstall.)
 
I suspect CUPS is fairly robust. Device independent postscript laser printing has been around for decades from the beginning.

20 yrs ago I used CUPS on mac mini "thin client" to talk to ethernet Samsung laser printer which wasn't "supported" and driven by RDP printer redirection. It was pretty simple to follow the directions and operated with no issues forever. (But the techs we had trying to replicate the setup managed to nuke MacOS and had to reinstall.)
For me, if a printer is supported by CUPS, FreeBSD will take it like a champ, no stinkin' RDP redirection needed. :p
 
Back
Top