I have a little script that makes Postscript from man pages. I
sometimes like to print these. I used to use
manlp <something> | lpr
and it worked fine. However, I now have a printer capable of
duplexing, but to use that feature, I have to
manlp <something> | ps2pdf ><somewhere>
evince <somewhere>
and tell the printer driver used by evince to duplex its output.
Is there some way to script this, preferably in a single pipeline?
--
Kevin O'Gorman, PhD
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
04-19-2012, 12:57 AM
Linda
how to script duplex printing
On 04/18/2012 04:08 PM, Kevin O'Gorman wrote:
I have a little script that makes Postscript from man pages. I
sometimes like to print these. I used to use
manlp<something> | lpr
and it worked fine. However, I now have a printer capable of
duplexing, but to use that feature, I have to
manlp<something> | ps2pdf><somewhere>
evince<somewhere>
and tell the printer driver used by evince to duplex its output.
Is there some way to script this, preferably in a single pipeline?
Here is my script for printing pdf files duplex for nautilus
without opening them. I'm not sure this is what you were
looking for. I have a separate script to run ps2pdf since I
don't necessarily want to print most of the files I turn
into pdfs.
#!/bin/bash
# print.sh
# print files from the right-click context menu in Nautilus
#place this script in ~/.gnome2/nautilus-scripts
# uses the default print
echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while
read file
do
lpr -o sides=two-sided-long-edge "$file"
done
exit 0
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
04-19-2012, 02:34 AM
how to script duplex printing
----- Original Message -----
> From: "Linda" <haniganwork@earthlink.net>
> To: "Ubuntu user technical support, not for general discussions" <ubuntu-users@lists.ubuntu.com>
> Sent: Wednesday, April 18, 2012 5:57:37 PM
> Subject: Re: how to script duplex printing
> On 04/18/2012 04:08 PM, Kevin O'Gorman wrote:
> > I have a little script that makes Postscript from man pages. I
> > sometimes like to print these. I used to use
> > manlp<something> | lpr
> > and it worked fine. However, I now have a printer capable of
> > duplexing, but to use that feature, I have to
> > manlp<something> | ps2pdf><somewhere>
> > evince<somewhere>
> > and tell the printer driver used by evince to duplex its output.
> >
> > Is there some way to script this, preferably in a single pipeline?
>
> Here is my script for printing pdf files duplex for nautilus
> without opening them. I'm not sure this is what you were
> looking for. I have a separate script to run ps2pdf since I
> don't necessarily want to print most of the files I turn
> into pdfs.
>
> #!/bin/bash
> # print.sh
> # print files from the right-click context menu in Nautilus
> #place this script in ~/.gnome2/nautilus-scripts
>
> # uses the default print
>
> echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while
> read file
> do
> lpr -o sides=two-sided-long-edge "$file"
> done
> exit 0
That should work if that is the correct option string for OP's printer. (Probably is, but I don't really know enough about it.)
You can find out and set system wide or user defaults by using lpoptions The man page is somewhat lacking, but there are examples here http://www.cups.org/doc-1.1/sum.html Take a look at section 4.
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
04-19-2012, 02:35 AM
Rashkae
how to script duplex printing
On 04/18/2012 08:57 PM, Linda wrote:
Here is my script for printing pdf files duplex for nautilus without
opening them. I'm not sure this is what you were looking for. I have
a separate script to run ps2pdf since I don't necessarily want to
print most of the files I turn into pdfs.
#!/bin/bash
# print.sh
# print files from the right-click context menu in Nautilus
#place this script in ~/.gnome2/nautilus-scripts
# uses the default print
echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while
read file
do
lpr -o sides=two-sided-long-edge "$file"
done
exit 0
Use lpoptions -l to see what options / values are valid for your
printer. For example, on my printer, I would use -o Duplex=DuplexNoTumble
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
04-19-2012, 03:08 AM
"Kevin O'Gorman"
how to script duplex printing
On Wed, Apr 18, 2012 at 7:35 PM, Rashkae <ubuntu@tigershaunt.com> wrote:
> On 04/18/2012 08:57 PM, Linda wrote:
>>
>>
>> Here is my script for printing pdf files duplex for nautilus without
>> opening them. *I'm not sure this is what you were looking for. *I have a
>> separate script to run ps2pdf since I don't necessarily want to print most
>> of the files I turn into pdfs.
>>
>> #!/bin/bash
>> # print.sh
>> # print files from the right-click context menu in Nautilus
>> #place this script in ~/.gnome2/nautilus-scripts
>>
>> # uses the default print
>>
>> echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while
>> read file
>> * *do
>> * * * * lpr -o sides=two-sided-long-edge "$file"
>> done
>> exit 0
>>
>
> Use lpoptions -l to see what options / values are valid for your printer.
> For example, on my printer, I would use -o Duplex=DuplexNoTumble
Thanks very much. DuplexNoTumble worked for me too. Problem solved.
--
Kevin O'Gorman, PhD
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users