Skip to content

rrthomas/pdfjam-extras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pdfjam-extras

This repository holds a copy of various 'wrapper' scripts that previously were distributed as part of the pdfjam package (i.e., in releases of pdfjam prior to version 3.02).

These scripts are explicitly not supported. In particular:

  • any and all issues reported for these scripts, via GitHub, will simply be left open;
  • pull requests will not be merged.

--- unless, of course, someone else decides to support the scripts in a repository of their own.

I make the scripts available here just in case someone might find them useful.

If somebody else wants to improve and maintain these scripts as a separate package for distribution in future, then that's fine by me of course! (and it would be warmly welcomed)

Licensed under GPL: see the file COPYING for details. These scripts are provided with absolutely no warranty of fitness for any purpose whatsoever.

The wrapper scripts are:

  • pdfnup, pdfpun
  • pdfjoin
  • pdf90, pdf180, pdf270
  • pdfflip
  • pdfbook
  • pdfjam-pocketmod
  • pdfjam-slides3up, pdfjam-slides6up

They all are intended as example templates of scripts that end-users can make, in order to apply pdfjam conveniently on their specific tasks.

I now cannot support these 'wrapper' scripts as part of the pdfjam package --- mainly because what people want from them seems to vary so much. This results in quite a lot of questions and bug reports or feature requests, which most often I don't know how to handle. I don't actually use most of these wrapper scripts myself --- I typically prefer to construct a suitable call to pdfjam directly.

(An exception to that is that I do often use pdfjam-slides3up and pdfjam-slides6up; but even there I have very specific personal requirements, for example 4:3-shaped slides on A4 paper.)

The pdfjam script itself and its associated documentation are still supported by me --- for the foreseeable future.

David Firth, November 2019


Below are some excerpts from an old pdfjam-README file (from version 2.09 of the pdfjam package). These excerpts refer specifically to the wrapper scripts, and they are copied here just in case it helps someone.

(snip)

  • pdfnup, which allows one or more PDF files to be "n-upped" in roughly the way that psnup does for PostScript files. (This was the original motivation: for files that have to be printed, or have to be made available to dozens or hundreds of other people for printing, n-up formatting saves trees!)
  • pdfpun, similar to pdfnup but arranges the source pages right-to-left on the output page, ie in a format more suitable for right-to-left languages. This script works only on one file at a time. (Thanks to Ido for suggesting this.)
  • pdfjoin, which combines the pages of multiple PDF files together into a single file.
  • pdf90, pdf180 and pdf270 which rotate the pages of one or more PDF files.
  • pdfflip which reflects the pages of one or more PDF files. (Suitable for making transparencies if you want to write on the back of them!)
  • pdfbook which arranges pages into 2-up "signatures" (like psbook does for PostScript files), suitable for binding into a book. (Many people have suggested that this would be useful — I hope it is!)
  • pdfjam-pocketmod which converts 8 pages from a single PDF file into a pocket-sized booklet. (Folding instructions here! Thanks to Thomas Nemeth for suggesting this.)
  • pdfjam-slides6up and pdfjam-slides3up which process PDF presentation slides to six-per-page or three-per-page for handout purposes.

(snip)

In addition, each of the scripts has a (rather basic) man page. For example,

  man pdfjam-pocketmod

gives information about usage and other aspects of the pdfjam-pocketmod script.

(snip)

Using the scripts

(snip)

Example 1

Consider converting each of two documents to a side-by-side "2-up" format. Since we want the two documents to be processed separately, we'll use the --batch option:

  pdfjam --batch --nup 2x1 --suffix 2up --landscape \
--outfile . file1.pdf file2.pdf

This will produce new files file1-2up.pdf and file2-2up.pdf in the current working directory. The above call could be shortened a bit, by using pdfnup, to

  pdfnup --batch --suffix 2up file1.pdf file2.pdf

In a 'vanilla' installation of pdfjam, the default for --outfile is the current working directory.

(snip)

Example 5

A useful application of pdfjam is for producing a handout from a file of presentation slides. For slides made with the standard 4:3 aspect ratio a nice 6-up handout on A4 paper can be made by

  pdfjam --nup 2x3 --frame true --noautoscale false \
--delta "0.2cm 0.3cm" --scale 0.95 myslides.pdf \
--outfile myhandout.pdf

The --delta option here comes from the pdfpages package; the --scale option is passed to LaTeX's \includegraphics command.

The two wrapper scripts pdfjam-slides6up and pdfjam-slides3up are provided in order to make this particular application of pdfjam easy: for example,

  pdfjam-slides3up --pagenumbering true --batch \
slides1.pdf slides2.pdf

makes a pair of 3-up handouts slides1-3up.pdf and slides2-3up.pdf, with space for side-notes and with the handout pages numbered.

(Slides made by LaTeX's beamer package, using the handout class option, work especially nicely with this!)

Example 6

Suppose we want to trim the pages of our input file prior to n-upping. This can be done by using a pipe:

  pdfjam myfile.pdf --trim '1cm 2cm 1cm 2cm' --clip true \
--outfile /dev/stdout | \
pdfnup --frame true --outfile myoutput.pdf

The --trim option specifies an amount to trim from the left, bottom, right and top sides respectively; to work as intended here it needs also --clip true. These (i.e., trim and clip) are in fact options to LaTeX's \includegraphics command (in the standard graphics package).

(Thanks to Christophe Lange and Christian Lohmaier for suggesting an example on this.)

(snip)

Version history

2.09: The default behaviour of pdfbook is reverted to its pre-2.06 state, because --booklet true seems to be problematic for some users.  [package version never released]

2.08: fixed a bug in one of the tests. [2010-11-14]

2.07: two other common graphics formats (JPG and PNG) are now explicitly allowed as input files (i.e., not only PDF files are allowed as inputs). [2010-11-13]

2.06: changed the pdfbook script to include --booklet true as the default behaviour (thanks to Julien Bossert for this good suggestion). [2010-05-11]

2.05: changes to the pdfbook script [the --right-edge-binding option is now redundant, and there's a new --short-edge option for binding along the short edge of pages instead of the long edge (thanks to Marco Pessotto for this)]. The --preamble option to pdfjam is enhanced, to allow multiple instances which get concatenated. Also various minor corrections to man pages. [2010-04-25]

(snip)

About

Some unsupported 'wrapper' scripts for pdfjam

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published