Code Monkey home page Code Monkey logo

pdfjam-extras's Introduction

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)

pdfjam-extras's People

Contributors

davidfirth avatar

Stargazers

 avatar  avatar Saulius Krasuckas avatar  avatar  avatar Rex Ruu Haa avatar zmiimz avatar Eliaz Bobadilla avatar  avatar Carlos Henrique Lima Melara avatar Natanael Arndt avatar Mike Howell avatar Ibrahim Abou Elenein avatar Patrick Baker avatar Guido Bartolucci avatar Pablo Rios avatar Stefanus avatar Marcel Partap avatar Andreas Motl avatar Kay Savetz avatar  avatar David Villa Alises avatar T. Kurt Bond avatar Success avatar Horst avatar Florian avatar Cédric Boutillier avatar Dan White avatar Chris Concannon avatar Cam Webb avatar Andras Deak avatar Gregor Sturm avatar Joel avatar Adriel Kloppenburg avatar Marek Kowalczyk avatar somename123 avatar Alexander Waller avatar  avatar Kevin avatar Antonio Cabrera avatar Alejandro Soto avatar Simon May avatar Loreto Contreras avatar

Watchers

Baden Hughes avatar James Cloos avatar cryptarch avatar Herbert Voß avatar  avatar  avatar Florian avatar

pdfjam-extras's Issues

pdfjam-extras package('d)

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)

T'is done - https://github.com/tobybreckon/pdfjam-extras

[for the time being ... , future improvement and maintenance are dependant on available time]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.