Groups | Search | Server Info | Login | Register


Groups > comp.misc > #26437

Re: terminal only for two weeks

From Salvador Mirzo <smirzo@example.com>
Newsgroups comp.misc
Subject Re: terminal only for two weeks
Date 2025-02-12 13:12 -0300
Organization A noiseless patient Spider
Message-ID <87frkjuop1.fsf@example.com> (permalink)
References (2 earlier) <87bjwb4jat.fsf@example.com> <ffbaedfa-daa4-445f-555c-afb7937f8fc4@example.net> <87plkq34b8.fsf@example.com> <87o7071s35.fsf@example.com> <5Lra_5CB4XHr0riW@violet.siamics.net>

Show all headers | View raw


Ivan Shmakov <ivan@siamics.netREMOVE.invalid> writes:

>>>>>> On 2025-01-16, Salvador Mirzo wrote:
>
>  > I suspect I imagine wrong how things actually work.  I thought
>  > perhaps there would be a command line such as ``lpr --pages 7-14''.
>
> 	As has already been pointed in this thread, CUPS, a fairly
> 	common choice for a printer spooler in GNU/Linux systems,
> 	provides lp(1) command that does have just such an option.

Thanks for the information.  It turns out I'm not being able to print
two-sided-long-edge with CUPS and my Brother HL-L2360DW.  I resorted to
using /etc/printcap and lpd's lpr (not CUPS's lpr) because I can then
set my printer to always do two-sided-long-edge, which is nearly 100% of
the way I print.

>  > Now I believe a program like evince generates a PostScript of
>  > the pages you asked it to and then sends this complete PostScript
>  > document of the pages you requested to a pipe or file on disk
>  > that lpr sends to the printer.
>
> 	AIUI, traditional lpd(8) / lpr(1) do require the file to be
> 	preprocessed in such a way before it is submitted for printing,
> 	but even then, they do /not/ require for the file to be
> 	PostScript: it's possible to setup the respective filters to
> 	accept other formats, such as PDF.

That's what I did as well.  I use a filter called ps2pcl.

lp|remote|brother|Brother HL-L2360DW:\
  :lp=9100@BRWB052162167A6:\
  :if=/usr/local/libexec/ps2pcl:\
  :sh:sd=/var/spool/output/lpd:\
  :lf=/var/log/lpd-errs:

But today I learned that the Brother HL-L2360DW supports PostScript and
I was able to set it up that way with CUPS.  I just don't use because I
never want two-sided-short-edge or one-sided, which is all I can get
with CUPS for whatever reason.

>  > So, if qpdf doesn't do the same, I'm out of luck in terms of
>  > printing with lpr.  But I think I can find a program that takes
>  > page ranges and transformations like scaling and produces a
>  > PostScript document that I can send to lpr, so I can use qpdfview
>  > and use the command line to print stuff out.
>
> 	I'm not too familiar with qpdf(1) (and I don't think I've ever
> 	used qpdfview [*]), but it does have a --pages option.  E. g.:

Turns out qpdfview is a pretty usable PDF viewer and it's the one I'm
using the most here.  I think qpdfview is the closest thing to
SumatraPDF (on Windows), my favorite.

> $ qpdf --empty --pages in.pdf 5-8 -- out.pdf
> $ qpdf  in.pdf --pages . 5-8 -- out.pdf 

Thanks!  That works.

> 	(The second variant preserves the input document metadata,
> 	which isn't probably of much use for printing anyway.)

Good to know.  Sometimes we produce PDF for screen viewing.

> 	... A somewhat little-known fact is that once uncompressed, PDF
> 	is largely a text file (perhaps unsurprising, given it comes
> 	from the same company that created PostScript), though employing
> 	byte offsets rather unrestrictedly.
>
> 	qpdf(1) has a --qdf option that undoes compressesion and annotates
> 	the file in such a way that the companion fix-qdf program can
> 	fix the byte offsets, at least in certain cases, thus allowing the
> 	PDF file to be edited with a text editor.  (Though probably using
> 	a library, such as PDF::API2 for Perl, would be more practical
> 	than trying to, say, adapt sed(1) for automated edits in this case.)

You seem to know a lot about PostScript.  So here's a question.  When I
want to print two-sided-long-edge, is that a command included in the
PostScript document itself (and then sent to the printer)?

Back to comp.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

terminal only for two weeks Retrograde <fungus@amongus.com.invalid> - 2024-11-25 13:34 +0000
  Re: terminal only for two weeks D <nospam@example.net> - 2024-11-25 22:18 +0100
  Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-25 21:52 +0000
    Re: terminal only for two weeks Mike Spencer <mds@bogus.nodomain.nowhere> - 2024-11-26 03:18 -0400
      Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-26 21:28 +0000
    Re: terminal only for two weeks yeti <yeti@tilde.institute> - 2024-11-26 09:22 +0042
      Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-26 21:24 +0000
    Re: terminal only for two weeks candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2024-11-30 01:20 +0000
      Re: terminal only for two weeks yeti <yeti@tilde.institute> - 2024-11-30 04:22 +0042
        Re: terminal only for two weeks candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2024-12-01 20:40 +0000
      Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-30 03:52 +0000
        Re: terminal only for two weeks candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2024-12-01 20:40 +0000
          Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-01 23:24 +0000
            Re: terminal only for two weeks candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2024-12-02 02:00 +0000
              Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-02 05:41 +0000
  Re: terminal only for two weeks John McCue <jmccue@qball.jmcunx.com> - 2024-11-26 03:13 +0000
    Re: terminal only for two weeks D <nospam@example.net> - 2024-11-26 10:22 +0100
      Re: terminal only for two weeks yeti <yeti@tilde.institute> - 2024-11-26 12:15 +0042
        Re: terminal only for two weeks D <nospam@example.net> - 2024-11-26 16:36 +0100
          Re: terminal only for two weeks not@telling.you.invalid (Computer Nerd Kev) - 2024-11-27 07:52 +1000
            Re: terminal only for two weeks D <nospam@example.net> - 2024-11-27 10:51 +0100
              Re: terminal only for two weeks not@telling.you.invalid (Computer Nerd Kev) - 2024-11-28 06:44 +1000
                Re: terminal only for two weeks yeti <yeti@tilde.institute> - 2024-11-28 05:54 +0042
                Re: terminal only for two weeks D <nospam@example.net> - 2024-11-28 10:52 +0100
                Re: terminal only for two weeks not@telling.you.invalid (Computer Nerd Kev) - 2024-11-29 06:17 +1000
                Re: terminal only for two weeks D <nospam@example.net> - 2024-11-28 22:05 +0100
                Re: terminal only for two weeks yeti <yeti@tilde.institute> - 2024-11-29 02:19 +0042
                Re: terminal only for two weeks D <nospam@example.net> - 2024-11-29 10:38 +0100
                Re: terminal only for two weeks D <nospam@example.net> - 2024-11-29 22:39 +0100
          Re: terminal only for two weeks Mike Spencer <mds@bogus.nodomain.nowhere> - 2024-11-26 17:57 -0400
            Re: terminal only for two weeks D <nospam@example.net> - 2024-11-27 10:54 +0100
              Re: terminal only for two weeks Mike Spencer <mds@bogus.nodomain.nowhere> - 2024-11-28 01:41 -0400
                Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-11-28 06:42 +0000
                Re: terminal only for two weeks D <nospam@example.net> - 2024-11-28 10:56 +0100
                URIs within URIs: google.com/url?q= et al. Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2024-12-20 18:42 +0000
                Re: URIs within URIs: google.com/url?q= et al. Andy Burns <usenet@andyburns.uk> - 2024-12-20 19:03 +0000
                Re: URIs within URIs: google.com/url?q= et al. Mike Spencer <mds@bogus.nodomain.nowhere> - 2024-12-22 01:39 -0400
            Re: terminal only for two weeks Oregonian Haruspex <no_email@invalid.invalid> - 2024-12-04 06:11 +0000
              Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-04 06:42 +0000
                Re: terminal only for two weeks candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2024-12-04 14:30 +0000
                Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-05 01:46 +0000
                Re: terminal only for two weeks not@telling.you.invalid (Computer Nerd Kev) - 2024-12-08 07:52 +1000
                Re: terminal only for two weeks root <NoEMail@home.org> - 2024-12-08 14:11 +0000
                Re: terminal only for two weeks Bozo User <anthk@disroot.org> - 2025-01-12 23:01 +0000
                Re: terminal only for two weeks D <nospam@example.net> - 2025-01-13 10:46 +0100
                Re: terminal only for two weeks not@telling.you.invalid (Computer Nerd Kev) - 2025-01-14 06:52 +1000
                Re: terminal only for two weeks D <nospam@example.net> - 2025-01-14 18:54 +0100
                web Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2025-01-16 07:55 +0000
                Re: web not@telling.you.invalid (Computer Nerd Kev) - 2025-01-17 07:10 +1000
                Re: web yeti <yeti@tilde.institute> - 2025-01-17 04:58 +0042
                Re: web Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2025-01-18 14:05 +0000
                Re: web not@telling.you.invalid (Computer Nerd Kev) - 2025-01-19 09:09 +1000
                Re: web candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-01-29 20:10 +0000
                Re: web Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-02-04 21:42 +0000
                Re: web Ben Collver <bencollver@tilde.pink> - 2025-01-19 14:47 +0000
                Re: web yeti <yeti@tilde.institute> - 2025-01-19 16:14 +0042
                Re: web snipeco.2@gmail.com (Sn!pe) - 2025-01-19 16:05 +0000
                Re: web Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2025-01-19 19:15 +0000
                Re: web Ben Collver <bencollver@tilde.pink> - 2025-01-20 15:37 +0000
                Re: web Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2025-01-24 18:45 +0000
                Re: web news@zzo38computer.org.invalid - 2025-01-20 11:23 -0800
                Re: web Dave Yeo <dave.r.yeo@gmail.com> - 2025-01-16 18:04 -0800
                Re: terminal only for two weeks Bozo User <anthk@disroot.org> - 2025-01-12 23:01 +0000
                Re: terminal only for two weeks yeti <yeti@tilde.institute> - 2024-12-05 06:34 +0042
                Re: terminal only for two weeks yeti <yeti@tilde.institute> - 2025-01-16 11:42 +0042
  Re: terminal only for two weeks Anssi Saari <anssi.saari@usenet.mail.kapsi.fi> - 2024-11-28 12:45 +0200
  Re: terminal only for two weeks Bozo User <anthk@disroot.org> - 2025-01-12 23:01 +0000
    Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-01-12 22:03 -0300
      Re: terminal only for two weeks D <nospam@example.net> - 2025-01-13 10:48 +0100
        Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-01-13 16:24 -0300
          Re: terminal only for two weeks D <nospam@example.net> - 2025-01-14 18:50 +0100
          Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-01-15 22:10 -0300
            Re: terminal only for two weeks Rich <rich@example.invalid> - 2025-01-16 04:15 +0000
            Re: terminal only for two weeks Computer Nerd Kev <not@telling.you.invalid> - 2025-01-16 15:58 +1000
            Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-21 05:31 +0000
            Re: terminal only for two weeks Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2025-01-23 19:33 +0000
              Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-02-12 13:12 -0300
                Re: terminal only for two weeks Jerry Peters <jerry@example.invalid> - 2025-02-16 20:55 +0000
                Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-02-16 22:54 -0300
                Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-02-16 22:56 -0300
                Re: terminal only for two weeks Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-02-17 03:41 +0000
                Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-02-19 13:02 -0300
                Re: terminal only for two weeks kludge@panix.com (Scott Dorsey) - 2025-02-17 22:18 +0000
                Re: terminal only for two weeks Salvador Mirzo <smirzo@example.com> - 2025-02-19 13:03 -0300

csiph-web