Creating A5 books

Friday, May 13. 2005

A while ago I stumbled over the service of pdfcity.com which allows you to upload a pdf document and download it re-formatted to be printed as a book. This means the pages will be rearranged in a way so that - after printing - you can cut the A4 paperstack in half, clap it together and bind it. Now you have a A5 book/brochure.

What bothered me was pdfcity.com only allowed a maximum pdf-size of 5MB. I came up with the idea to implement this myself, allow .tex, .ps and .pdf as input and (of course) bigger files. I'm not quite done with the needed php scripting but I still want to share with you a quick way to do this.

For this to work you need to have psutils and either ghostscript or xpdf (recommended) installed. All three are available for all major operating systems. Do the following in the command-line:

  pdftops mytext.pdf
  psbook mytext.ps mytext_1.ps
  psnup -m10 -2 mytext_1.ps mytext_2.ps
  ps2pdf mytext_2.ps mytext_book.pdf
  rm -f *.ps
If pdftops doesn't eat you pdf you can use Ghostscript's pdf2ps instead. From my experience you get better quality with pdftops, additionally it preserves links and bookmarks of the original pdf. But - as said - it is really strict with the input pdf files, especially regarding fonts.

It's not like this is something new. Still I think it is not common knowledge how to create books out of pdf files. Of course I will post here as soon as my automated php book creator script is ready.

Peace out
Matthias



Trackbacks


Trackback specific URI for this entry
    No Trackbacks

Comments


    No comments

Add Comment

Markdown format allowed
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA