File: PDFjam-README.html

package info (click to toggle)
pdfjam 1.20-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 196 kB
  • ctags: 9
  • sloc: sh: 596; makefile: 47
file content (319 lines) | stat: -rw-r--r-- 11,764 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html>
<head> 
<title>PDFjam-README.html</title> 
</head> 

<body>
<!-- pdfmerge, pdfcat-->

<p>
<b>
This file is kept up to date at 
<a href="http://www.warwick.ac.uk/go/pdfjam">http://www.warwick.ac.uk/go/pdfjam</a>.
</b>
</p>

<ul>
<li><A HREF="#overview">Overview</a></li>
<li><A HREF="#prereq">Pre-requisites</a></li>
<li><A HREF="#download">Download</a></li>
<li><A HREF="#install">Installation/configuration</a></li>
<li><A HREF="#using">Using the scripts</a></li>
<li><A HREF="#droplets">Mac OS X only: drag-and-drop</a></li>
<li><A HREF="#faq">FAQ</a></li>
<li><A HREF="#history">Version history</a></li>
</ul>


<p>
<A NAME="overview"></A>
<h2 align="justify">Overview</h2>

<p><b>PDFjam</b> is a small collection of shell scripts which provide a simple interface to some of the functionality of the excellent <b>pdfpages</b> package (by Andreas Matthias) for <b>pdfLaTeX</b>.  At present the utilities available are:
<ul>
<li>
<b>pdfnup</b>, which allows PDF files to be "n-upped" in roughly the way that
<b>psnup</b> does for PostScript files.  
</i>
<li>
<b>pdfjoin</b>, which  concatenates the pages of multiple PDF files together into a single file</li>
<li>
<b>pdf90</b>, which  rotates the pages of one or more PDF files through 90 degrees
(anti-clockwise).</li>
</ul>

<p>
In every case, source files are left unchanged.

<p>
A potential drawback of these utilities is that any
hyperlinks in the source PDF are lost.  On the positive side, 
there is no appreciable degradation of image quality in processing
PDF files with thse programs, unlike some other indirect methods such as
pdf2ps | psnup | ps2pdf (in the author's experience). 
[Better than the rather indirect approach taken here would
be filters that work directly on the PDF code, to produce output files with hyperlinks intact.]

<p>
These tools are designed for Unix-like systems, including Mac OS X.   I am told that 
pdfnup works fine also on Windows computers with MikTeX
and the <a href="http://www.cygwin.com">cygwin</a> unix tools; I know of no reason
why pdfjoin and pdf90 should not also work in that way.

<p>
An alternative set of PDF manipulation tools, which are java-based, is provided by the <a href="http://multivalent.sourceforge.net/">Multivalent</a> project.  They do much the same things as PDFjam, and
quite a bit more.  Hyperlinks don't seem to be preserved
there either, though, when n-upping a document.
</p>

<p>
For Mac OS X, n-up with a more visual interface is provided by <a href="http://evolve.lse.ac.uk/software/PDFNupMaker/">PDF Nup Maker</a>.  Like PDFjam, this is a front end to pdflatex/pdfpages.

<p>
The PDFjam software is made available free, under GPL version 2 (see the file named
COPYING that is included with the package).  It comes
with ABSOLUTELY NO WARRANTY of fitness for any purpose whatever.
</p>

<A NAME="prereq"></A>
<h2 align="justify">Pre-requisites</h2>

<ol> <li>A Unix-like operating system (Linux, Mac OS X, Solaris,
etc.)</li> 
<li>A working, up-to-date installation of <a href="http://www.tug.org/applications/pdftex">pdfTeX</a> (including pdflatex and
an up-to-date copy of <a href="http://pdftex-def.berlios.de/">pdftex.def</a>)</li> 
<li>A working
installation of the LaTeX package <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages">pdfpages</a> (version 0.2e or
later)</li> 
</ol>

<A NAME="download"></A>
<h2 align="justify">Download</h2>

<p>Download the shell scripts
as <a href="http://www.warwick.ac.uk/go/pdfjam/pdfjam_1.20.tgz">pdfjam_1.20.tgz</a>. 
</p>

<p>
Bernhard Walle has kindly made available an <a href="http://turing.fh-landshut.de/~bwalle/pdfjam/">RPM package</a> for Linux.
</p>

<p>
For Mac OS X droplets, see <A HREF="#droplets">below</a>.
</p>

<p>
PDFjam is a project at <a href="http://freshmeat.net/projects/pdfjam/">freshmeat</a>: please subscribe there to receive update announcements.

<A NAME="install"></A>
<h2 align="justify">Installation/configuration</h2>

<p>
Look at the small block of lines flagged CONFIGURATION in each of the scripts.  
The main requirement is to provide the correct path to pdflatex
on your system.  If pdflatex is in your search path (as it ought to be),
no change should be needed.  Also set here are defaults for paper size etc.  These settings can
be changed by editing the scripts themselves, or (better) by putting them in
a site-configuration file (at  <tt>/etc/pdfnup.conf</tt>,
       <tt>/usr/share/etc/pdfnup.conf</tt>,      
       <tt>/usr/local/share/pdfnup.conf</tt>,       or
       <tt>/usr/local/etc/pdfnup.conf</tt>) and/or a user-defaults
file <tt>~/.pdfnup.conf</tt> to be read in that order when any of pdfnup, pdfjoin or pdf90
runs (if present these configuration files will override corresponding settings found in the 
scripts themselves).
</p>

<p>
Make sure that the scripts are executable by all who might need to
execute it.  If they are to be available to all users on your system, perhaps move
them to<tt> /usr/local/bin </tt>(or make symbolic links to them there).  The
man pages should be installed on the <tt>MANPATH</tt> of all who need to read 
them.
</p>

<A NAME="using"></A>
<h2 align="justify">Using the scripts</h2>

<p>
Once the scripts are installed, help on usage can be obtained by
<pre>
     pdfnup --help
</pre>
<pre>
     pdfjoin --help
</pre>
<pre>
     pdf90 --help
</pre>
</p>

<h3 align="justify">Some examples:</h3>

<p>
For <b>pdfnup</b>,
<pre>
     pdfnup mywork/wasteful.pdf --nup 2x2
</pre>
will produce a new 4-up file<tt> wasteful-2x2.pdf </tt>in directory <tt> mywork </tt>, and
<pre>
     pdfnup mywork/wasteful.pdf --nup 2x1 --outfile mywork2/halfthewaste.pdf
</pre>
produces a 2-up file<tt> halfthewaste.pdf </tt>in directory<tt> mywork2</tt>.  
The source pdf file<tt> wasteful.pdf </tt>is left unchanged.
</P>

<p>
<pre>
   pdfnup file1.pdf file2.pdf --frame true --nup 2x2
</pre>
makes new files <tt> file1-2x2.pdf </tt> and <tt> file2-2x2.pdf </tt> in the current directory, with
a border printed around the 4 input pages on each output page.
</p>

<p>
Other options to pdfnup include <tt>--pages</tt>, <tt>--paper</tt>, <tt>--orient</tt>, 
<tt>--trim</tt>, <tt>--delta</tt>, <tt>--offset</tt>, <tt>--scale</tt> and <tt>--openright</tt>.

<p>
For <b>pdfjoin</b>,
<pre>
  pdfjoin file1.pdf file2.pdf file3.pdf --fitpaper true
</pre>
produces a new file <tt> file3-joined.pdf </tt> in the current directory, with all
pages included at their original sizes.
<pre>
  pdfjoin file1.pdf file2.pdf file3.pdf --fitpaper false --paper a4paper --outfile ~/docs/mybigfile.pdf
</pre>
scales all of the pages to fit on A4-size paper, and makes the resultant file as <tt> ~/docs/mybigfile.pdf </tt>.

<p>
One possible use for pdfjoin, then, is to change the paper size of a PDF file, for example
<pre>
  pdfjoin USletterfile.pdf --paper a4paper --fitpaper false --outfile USletterfile-A4size.pdf
</pre>
</p>

<p>
Other options to pdfjoin include <tt>--trim</tt> and <tt>--offset</tt>.  
The output 
filename and location are determined by the last input file if
<tt>--outfile</tt> is not specified.
</p>

<p>
For <b>pdf90</b>,
<pre>
  pdf90 file1.pdf --outfile stuff/myrotatedfile.pdf
</pre> 
rotates all pages and puts the result in <tt> myrotatedfile.pdf </tt> in subdirectory <tt>stuff</tt> of the current directory, while
<pre>
  pdf90 file1.pdf file2.pdf
</pre>
makes new files <tt> file1-rotated.pdf </tt> and <tt> file2-rotated.pdf </tt> in the current directory.  pdf90 retains original page sizes in the output file.
</p>


<A NAME="droplets"></A>
<h2 align="justify">Mac OS X only: drag-and-drop</h2>

Under <b>Mac OS X</b>, <a href="http://www.wsanchez.net/software/">DropScript</a>
can be used to make simple drag-and-drop applications from these scripts.
Some sample droplets are provided in 
<a href="http://www.warwick.ac.uk/go/pdfjam/pdfdroplets_1.20.tgz">pdfdroplets_1.20.tgz</a>: 
these may be all you'll need!  The sample droplets look like this:
<center>
<img src="pdfdroplets.png">
</center>
</p>

<p>
These droplets assume that your pdflatex is at 
/usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex.
If pdflatex lives somewhere else on your system, the droplets 
won't work until you include in your home directory a file 
named <tt>.pdfnup.conf</tt> (or there is a system-wide file <tt>pdfnup.conf</tt>
at one of the four locations listed above), 
containing the line
<pre>
pdflatex=/path/to/pdflatex
</pre>
where <tt> /path/to/pdflatex </tt> is the answer you get when you type 
<tt> which pdflatex </tt> in the Terminal.
</p>

<A NAME="faq"></A>
<h2 align="justify">FAQ</h2>

<p>
<b>1.  Why "PDFjam"?</b><br>  Because it's for PDF files, and jam is what I like best 
on my toast (well, second best after marmalade, anyway). 
<p>
<b>2.  The thing runs but the output doesn't look the way it should.  Why?</b><br>
 Most likely either your pdfTeX or your pdfpages installation is an old version.  (Check also that pdftex.def, to be found in in .../texmf/tex/latex/graphics/, is up to date.)  If the problem persists even with up-to-date versions of pdfTeX, pdftex.def and pdfpages, then please do let me know about it.
</p>

<A NAME="history"></A>
<h2 align="justify">Version history</h2>
<p>
<B>1.20</B>:
added minimal man pages; added extra possible locations for the site-wide
configuration file [2005-01-25]
<p>
<B>1.11</B>:
added the <tt>--scale</tt> option to pdfnup, which allows page margins either
to be enlarged (e.g,. <tt>--scale 0.9</tt>) or reduced (e.g,. <tt>--scale 1.1</tt>)
by scaling the page contents.  By popular request!  [2004-10-13]
<p>
<B>1.10</B>: 
output files now appear by default in same directory as input, rather than in the
current working directory; fixed a bug that caused the scripts not
to work on some versions of Solaris (thanks to Daniel Gebhart); 
major improvements to the Mac OS X sample droplets.  [2004-06-24]
<p>
<B>1.03</B>: minor changes towards POSIX compliance.  [2004-05-09]
<p>
<B>1.02</B>: added a COPYING file to the package.  [2004-05-08]
<p>
<B>1.01</B>: fixed a bad (and accidental) feature in pdfjoin whereby it would leave a file
named "temp" in the user's home directory; some new options added to 
pdfnup and pdfjoin.  [2004-05-08]
<p>
<B>1.00</B>: package re-named PDFjam.  [2004-05-07]
<p>
<B>0.99a</B>: a minor change to the output of <tt>pdfnup --help</tt> 
and <tt>pdfjoin --help</tt>  [2004-05-06]
<p>
<B>0.99</B>: various improvements to pdfnup, including the handling of 
multiple
PDF input files.  Added pdfjoin and pdf90.   [2004-05-05]
<p>
<B>0.97</B>: corrections to the output of <tt>pdfnup --help</tt> [2004-04-23]
<p>
<B>0.96</B>: minor changes to comments in the pdfnup script [2004-02-12]
<p>
<B>0.95</B>: added the possibility of site-specific and user-specific 
configuration files (thanks to Jason Lewis for suggesting this) [2004-01-28]
<p>
<B>0.9</B>: added <tt>--openright</tt> (thanks to Jason Lewis for 
suggesting this) [2004-01-28]
<p>
<B>0.8</B>: added <tt>pdfnup --help</tt> facility (thanks to Wilfrid Kendall 
for this suggestion) [2003-09-12]
<p>
<B>0.7</B>: paths involving spaces now permitted; page trimming added (thanks
to Alex Montgomery for suggesting that); default output filename now has a
dash inserted before the "nup" label (as in <tt> wasteful-2x2.pdf </tt>);
sample Mac OS X droplets provided
[2003-01-26]
<p>
<B>0.6</B>: use of paths involving spaces now reports an error [2002-08-22]
<p>
<B>0.5</B>: fixed a bug which caused incompatibility with some types of unix
[2002-06-24]
<p>
<B>0.4</B>: better error trapping, improved portability [2002-04-30]
<p>
<B>0.3</B>: first public release of pdfnup (2002-04-04)

</body> </html>