czwartek, 30 września 2010

Double-sided printing under Linux

I often have a lot of documents to print and prefer double-sided printouts. Most Linux printer drivers (if not all) don't support double-sided printing, you can always do it by hand .. but i'm just too lazy for such a solution. I wanted to magically rearrange my pdfs for double-sided printing. For my printer (Minolta 1300W) I have to first print even pages, then insert the paper back to paper feeder and continue printing odd pages is reversed order. To accomplish this task I used pdftoolkit (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/). In most Linux distributions it should be available in repository, like in Ubuntu you can install it using Synaptic or typing in a terminal

sudo apt-get install pdftk

To convert my pdfs I had to use the following command
pdftk A=kalman_intro.pdf cat A1-endeven Aend-1oddS output kalman_dsp.pdf

You first select the input file kalman_intro.pdf with handle A, then use parameter cat for catenate, then select all even pages of document A (from 1 to the last page - end), select all odd pages in reversed order (handle A, from last page to first, odd pages) - the S stands for south and tells pdftk to rotate these pages 180 deg. Finally you specify the output file. This way you can make any pdf double-sided printing ready without effort :).

For some more info on pdftk try
http://www.pdflabs.com/docs/pdftk-man-page or http://www.pdflabs.com/docs/pdftk-cli-examples/

Brak komentarzy:

Prześlij komentarz