how to script duplex printing

Rashkae ubuntu at tigershaunt.com
Thu Apr 19 02:35:26 UTC 2012


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




More information about the ubuntu-users mailing list