Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

Monday, June 25, 2007

How to print an a5 booklet

You've got a file full of a5 pages and want to print it on an a4 printer so that you can fold it and it will be a booklet:


psbook -s<number_of_pages> file.ps file_sorted.ps


Number of pages is here the number of pages in a stack (normally the number of pages of the document plus a bit that it is dividable by 4). If you are binding a real book, it is the number of pages which will be folded and sewn together.


psnup -2 -pa4 -Pa5 file_sorted.ps printme.ps


-p is the page size of the output file, -P the page size of the input file.

Print with flipping on the short edge. This is tricky on the command line, but if you print from a viewer this should be easy...

Friday, March 30, 2007

Script Foo

In case you want to convert a bunch of eps-files to pdf-files (e.g. root generated plots, as the pdf output of root sucks and the eps sometimes produce strange encoding-effects when converted directly...):


#!/bin/bash
for epsfile in $*;
do
echo "Converting $epsfile ...";
eps2eps $epsfile ${epsfile%.eps}_temp.eps;
epstopdf ${epsfile%.eps}_temp.eps -o=${epsfile%.eps}.pdf;
rm ${epsfile%.eps}_temp.eps;
done