unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Printing from pdf-tools with options
@ 2020-03-28 11:18 Marcin Borkowski
  2020-03-28 11:57 ` Eli Zaretskii
  2020-03-29  0:04 ` Stephen Berman
  0 siblings, 2 replies; 8+ messages in thread
From: Marcin Borkowski @ 2020-03-28 11:18 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi all,

I'd like to be able to print pdf files (preferably from pdf-tools) using
the lp command.  I know about pdf-tools' C-c C-p
(`pdf-misc-print-document'), but it won't let me do the two things I'd
like to do:

- decide if I want 1-page-per-page or 2-up printing, and/or
- select pages to print.

Both things are easy to accomplish with commandline switches to lp, but
my question is about Emacs interface to this.  (I'd be happy to write
something like this myself - I might even have a few spare minutes to do
that in the next few days - but I don't feel like reinventing the
wheel.)

TIA,

--
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Printing from pdf-tools with options
  2020-03-28 11:18 Printing from pdf-tools with options Marcin Borkowski
@ 2020-03-28 11:57 ` Eli Zaretskii
  2020-03-28 12:32   ` Marcin Borkowski
  2020-03-29  0:04 ` Stephen Berman
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2020-03-28 11:57 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Marcin Borkowski <mbork@mbork.pl>
> Date: Sat, 28 Mar 2020 12:18:08 +0100
> 
> I'd like to be able to print pdf files (preferably from pdf-tools) using
> the lp command.

What is "the lp command"?  I'm not familiar with an Emacs command by
that name, what am I missing?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Printing from pdf-tools with options
  2020-03-28 11:57 ` Eli Zaretskii
@ 2020-03-28 12:32   ` Marcin Borkowski
  2020-03-28 13:07     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin Borkowski @ 2020-03-28 12:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


On 2020-03-28, at 12:57, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Marcin Borkowski <mbork@mbork.pl>
>> Date: Sat, 28 Mar 2020 12:18:08 +0100
>>
>> I'd like to be able to print pdf files (preferably from pdf-tools) using
>> the lp command.
>
> What is "the lp command"?  I'm not familiar with an Emacs command by
> that name, what am I missing?

It is a shell command, of course, provided by CUPS (at least on Arch).

Best,

--
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Printing from pdf-tools with options
  2020-03-28 12:32   ` Marcin Borkowski
@ 2020-03-28 13:07     ` Eli Zaretskii
  2020-03-28 17:37       ` Marcin Borkowski
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2020-03-28 13:07 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Marcin Borkowski <mbork@mbork.pl>
> Cc: help-gnu-emacs@gnu.org
> Date: Sat, 28 Mar 2020 13:32:18 +0100
> 
> > What is "the lp command"?  I'm not familiar with an Emacs command by
> > that name, what am I missing?
> 
> It is a shell command, of course, provided by CUPS (at least on Arch).

If it can print image files, you should be able to save the buffer to
a file and then invoke lp on that file, right?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Printing from pdf-tools with options
  2020-03-28 13:07     ` Eli Zaretskii
@ 2020-03-28 17:37       ` Marcin Borkowski
  2020-03-28 18:21         ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin Borkowski @ 2020-03-28 17:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


On 2020-03-28, at 14:07, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Marcin Borkowski <mbork@mbork.pl>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Sat, 28 Mar 2020 13:32:18 +0100
>>
>> > What is "the lp command"?  I'm not familiar with an Emacs command by
>> > that name, what am I missing?
>>
>> It is a shell command, of course, provided by CUPS (at least on Arch).
>
> If it can print image files, you should be able to save the buffer to
> a file and then invoke lp on that file, right?

I think we speak of different things.  I can say "C-c C-p" in
a pdf-tools buffer and print the pdf file - that works.  I want to be
able to e.g. say "C-u C-c C-p" and be asked about which pages to print,
or whether to print 2-up etc.  It would even be enough to be prompted
for additional `lp' arguments.

Best,

--
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Printing from pdf-tools with options
  2020-03-28 17:37       ` Marcin Borkowski
@ 2020-03-28 18:21         ` Eli Zaretskii
  2020-04-04 21:32           ` Marcin Borkowski
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2020-03-28 18:21 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Marcin Borkowski <mbork@mbork.pl>
> Cc: help-gnu-emacs@gnu.org
> Date: Sat, 28 Mar 2020 18:37:20 +0100
> 
> > If it can print image files, you should be able to save the buffer to
> > a file and then invoke lp on that file, right?
> 
> I think we speak of different things.

I don't think so.

> I can say "C-c C-p" in a pdf-tools buffer and print the pdf file -
> that works.  I want to be able to e.g. say "C-u C-c C-p" and be
> asked about which pages to print, or whether to print 2-up etc.  It
> would even be enough to be prompted for additional `lp' arguments.

I tried to tell you how to write such a command.  Sorry if that wasn't
clear.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Printing from pdf-tools with options
  2020-03-28 11:18 Printing from pdf-tools with options Marcin Borkowski
  2020-03-28 11:57 ` Eli Zaretskii
@ 2020-03-29  0:04 ` Stephen Berman
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Berman @ 2020-03-29  0:04 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Help Gnu Emacs mailing list

On Sat, 28 Mar 2020 12:18:08 +0100 Marcin Borkowski <mbork@mbork.pl> wrote:

> Hi all,
>
> I'd like to be able to print pdf files (preferably from pdf-tools) using
> the lp command.  I know about pdf-tools' C-c C-p
> (`pdf-misc-print-document'), but it won't let me do the two things I'd
> like to do:
>
> - decide if I want 1-page-per-page or 2-up printing, and/or
> - select pages to print.
>
> Both things are easy to accomplish with commandline switches to lp, but
> my question is about Emacs interface to this.  (I'd be happy to write
> something like this myself - I might even have a few spare minutes to do
> that in the next few days - but I don't feel like reinventing the
> wheel.)

You can do this by customizing pdf-misc-print-programm-args (or by
writing a wrapper around pdf-misc-print-document that uses it).

Steve Berman



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Printing from pdf-tools with options
  2020-03-28 18:21         ` Eli Zaretskii
@ 2020-04-04 21:32           ` Marcin Borkowski
  0 siblings, 0 replies; 8+ messages in thread
From: Marcin Borkowski @ 2020-04-04 21:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


On 2020-03-28, at 19:21, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Marcin Borkowski <mbork@mbork.pl>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Sat, 28 Mar 2020 18:37:20 +0100
>> 
>> > If it can print image files, you should be able to save the buffer to
>> > a file and then invoke lp on that file, right?
>> 
>> I think we speak of different things.
>
> I don't think so.
>
>> I can say "C-c C-p" in a pdf-tools buffer and print the pdf file -
>> that works.  I want to be able to e.g. say "C-u C-c C-p" and be
>> asked about which pages to print, or whether to print 2-up etc.  It
>> would even be enough to be prompted for additional `lp' arguments.
>
> I tried to tell you how to write such a command.  Sorry if that wasn't
> clear.

Well, I know (more or less) how to write this command.  My question was
about whether anything like that exists.

Best,

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-04 21:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-28 11:18 Printing from pdf-tools with options Marcin Borkowski
2020-03-28 11:57 ` Eli Zaretskii
2020-03-28 12:32   ` Marcin Borkowski
2020-03-28 13:07     ` Eli Zaretskii
2020-03-28 17:37       ` Marcin Borkowski
2020-03-28 18:21         ` Eli Zaretskii
2020-04-04 21:32           ` Marcin Borkowski
2020-03-29  0:04 ` Stephen Berman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).