How to print multiple files?

Dotan Cohen dotancohen at gmail.com
Tue Jun 17 09:13:11 UTC 2008


2008/6/17 James Gray <james at gray.net.au>:
> Certainly is possible :)  Install the package "psutils" and assuming
> you have ghostscript installed, you can do this from the command line:
>
> for PDF in *.pdf
> do
> pdf2ps $PDF - | psnup -2 | lp
> done
>
> That will find every PDF file in the current directory, convert the
> PDF to Postscript, dump the result into "psnup" which will mash the
> postscript into a "2-up" format, then finally hand the PostScript to
> the default printer via "lp".  You may also replace "| lp" with ">
> `basename $PDF .pdf`-2up.ps" (without the "") to create a Postscript
> file in 2-up format for each PDF.
>
> If you'd prefer 4-up, replace "psnup -2" with "psnup -4".  Similarly,
> if your printer can do duplex (double sided printing) you can tell it
> to print both sides with "lp -o sides=two-sided-short-edge" instead of
> plain old "lp".  If you'd prefer the 2-up converted documents back in
> PDF format:
>
> for DOC in *-2up.ps
> do
> ps2pdf $DOC `basename $DOC .ps`
> done
>
> HTH,
>
> James
>

Thank you James. The script seems very flexible and I will certainly
use it. Unfortunately, the question is asked of a female user who I
have turned into a Kubuntu user, so she needs a way to print the files
directly from Konqueror. I think that one can add a service menu for
that, though. Thanks.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


More information about the kubuntu-users mailing list