On 2/16/23 16:09, Bob McGowan wrote:
On 2/16/23 12:01 PM, Brian wrote:
On Thu 16 Feb 2023 at 11:27:25 -0800, Bob McGowan wrote:
On 2/16/23 11:14 AM, Brian wrote:
On Thu 16 Feb 2023 at 11:52:21 -0500, Stefan Monnier wrote:
[1]to...@tuxteam.de [2023-02-16 16:53:02] wrote:
Just for kicks: have you tried sending a PS (or *gasp* PDF) file
down that alley (e.g. with socat)?
For That One Form in the Year this might be just sufficient...
Hint: start with a small one :)
I don't think "a small one" can be small enough in case it misfires.
Instead, I usually make sure there's only 1 sheet of paper in the tray
when I send the test (usually a sheet that I already used :-)
Producind a PDF with the line "This is a test" in it is
incredibly easy. Jumping through hoops is not needed.
However, the PDF file created (I used LibreOffice 'cause its fast and
easy) was 7,335 characters long, according to 'wc', which also reported
367 "words" and 139 "lines".
Given that a standard US letter size sheet (8.5 by 11 inches) has 66
lines per page, that is just over 2 pages.
So putting only one used sheet of paper in the printer would save a
couple of sheets of paper. ;)
Not much but why waste paper for a simple test?
I have no desire or intention to investigate how LibreOffice
deals with a single line text file converted to a PDF. This
works to not waste paper when fileout.pdf is printed:
/usr/lib/cups/filter/texttopdf 1 1 1 1 1 filein.txt > fileout.pdf
The point is that conversion to PDF results in a larger file than some
might expect.
Depends on the content. recent activity in adding gfx content to it has
expanded it quite a bit this file is now 1316 pages long on dead tree:
rw-r--r-- 1 root root 25471049 Feb 14 09:50 LinuxCNC_Documentation.pdf
But for whats in it gfx-wise today, just over 25 megabytes is really
good compression.
And we don't know if the printer actually does understands PDF
directly. If it does not, it would attempt to print the entire contents
of the file as plain text. At least, this is how I understood the
comment I was responding to.
In the case of your command (which, by the way, requires some "esoteric"
knowledge of CUPS), the resulting file, according to 'wc', is: 85 181
1020 fileout.pdf
Not as big as the LibreOffice file, but still more than one page of
output if printed as plain text.
And 99% of that "small" file is non-printed mode commands to the
printer, telling it how to present that one line of text. 25+ years ago
when ghostscript tried to be all, both ps v1.3 and v1.2 pdf at about
v5.1, I'm the one who compiled it for the amiga's, even devising a
couple bash scripts that made a simplex printer do duplex. I tried to
wear out a xerox 1650-ro, the fastest daisy wheel ever, failed, it still
works but no ribbons today.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>