Yes, you'll have to convert each PDF page into a single JPG file (Ghostscript can do that).
Then stitch together the resulting JPG files using another program (ImageMagick or GraphicsMagic can do that using their montage
sub-commands).
I'm not aware of any software which can do that in one go.
PDF-to-JPG conversion (with Ghostscript):
You'll want to make sure that you get the best possible result. So make sure you tweak the commandline options so they work for you. I'd start with this:
gswin32c.exe ^
-dBATCH ^
-dNOPAUSE ^
-dSAFER ^
-sDEVICE=jpeg ^
-dJPEGQ=95 ^
-r600x600 ^
-sOutputFile=c:/path/to/jpeg-dir/pdffile-%03d.jpeg ^
c:/path/to/pdffile.pdf
This will create JPGs called pdffile-001.jpeg, pdffile-002.jpg etc. The parameter *-dJPEGQ=95" sets "JPEG Quality" to 95%. It uses a resolution of "600x600 dpi". You may need to additionally control the pagesize of the resulting JPGs in case your Ghostscript's default doesn't fit your needs:
gswin32c.exe ^
-dBATCH ^
-dNOPAUSE ^
-dSAFER ^
-sDEVICE=jpeg ^
-dJPEGQ=95 ^
-r600x600 ^
-dPDFFitPage ^
-dFIXEDMEDIA ^
-dDEVICEWIDTHPOINTS=800 ^
-dDEVICEHEIGHTPOINTS=600 ^
-sOutputFile=c:/path/to/jpeg-dir/pdffile-%03d.jpeg ^
c:/path/to/pdffile.pdf
or
gswin32c.exe ^
-dBATCH ^
-dNOPAUSE ^
-dSAFER ^
-sDEVICE=jpeg ^
-dJPEGQ=95 ^
-r600x600 ^
-dPDFFitPage ^
-dFIXEDMEDIA ^
-sDEFAULTPAPERSIZE=a4 ^
-sOutputFile=c:/path/to/jpeg-dir/pdffile-%03d.jpeg ^
c:/path/to/pdffile.pdf
multiple-to-single-JPG-stitching with montage
(ImageMagick or GraphicsMagick):
The montage
command (used in this example is ImageMagick) allows you to control the tiling pattern. If you use e.g. -tile 4x3
you'd get this imposition layout:
1 2 3 4
5 6 7 8
9 10 11 12
You could use this command to stitch together 12 individual JPGs into one:
montage ^
-border 0 ^
-tile 4x3 ^
c:/path/to/jpeg-dir/pdffile-*.jpeg ^
c:/path/to/final.jpg
Of course, montage
has many dozen of additional parameters which allow you to determine background, spacing, offsets, decoration, labels, rotation, cropping, caption etc. for the input and the resulting JPG.
EDIT: (I had wanted to give this hint already in my original answer, but forgot.) montage
by default will use tile sizes of 120x120 pixels. If you want to keep the original page sizes for each tile, you have to add -geometry
to the commandline. Assuming you had A4 (=595x852 pt) pages in your PDF, and you want to keep this, but also add a spacing of 11pt to the horizontal and 22 pt to the vertical direction of the tiling (plus 4pt strong gray border/frame lines around each tile), do this:
montage ^
-border 4 ^
-tile 4x3 ^
-geometry 595x842+11+22 ^
c:/path/to/jpeg-dir/pdffile-*.jpeg ^
c:/path/to/final.jpg
EDIT 2: (Missed still another important hint.) If you do not want to lose the good image quality during the stitching/montage process, which your PDF-to-JPG conversion had created, then also add the -quality 100
parameter to your commandline like this:
montage ^
-border 4 ^
-tile 4x3 ^
-geometry 595x842+11+22 ^
-quality 100 ^
c:/path/to/jpeg-dir/pdffile-*.jpeg ^
c:/path/to/final.jpg
First, I use Linux, not Windows, so I can't test this, but I think something like this is right. (I'm almost tempted to tell you to install Linux inside a virtual machine for this, since stuff like this is sooo much easier with a grown-up operating system, but anyway, here goes my best bet for using Windows.)
First, open a Command/Dos prompt.
To navigate to the folder where your files are, use the CD command followed by the full path to your files in quotation marks. For example, if they are in "C:\Users\Somebody\Documents and Settings\My Documents\PDFs\", then type:
cd "C:\Users\Somebody\Documents and Settings\My Documents\PDFs\"
I think an alternative would be to simply create a batch file inside the same directory as the PDF and run the batch file from there.
OK, now I think you'll have to use the complete path to the Ghostscript executable, which you'll have to find for yourself. I'm going to assume it's "C:\Program Files (x86)\gs\gs9.00\bin\gswin32c.exe" but you'll need to double check that on your own computer. If you're using a different version of ghostscript, or a 32 bit version of Windows 7, it'll be somewhere else. Also make sure you use gswin32c.exe and not gswin32.exe, which is different.
Now find out exactly how many pages are in this PDF. I would know how to do that with a command in Linux, but I have no clue in Windows. I'm going to suppose it's 3002.
Now type in this command at the Command prompt (all one line):
FOR \L %G IN (1,1,3002) DO "C:\Program Files (x86)\gs\gs9.00\bin\gswin32c.exe" -dBATCH -dSAFER -dNOPAUSE -dFirstPage=%G -dLastPage=%G -sDEVICE=pswrite -o hello%G.ps hello.pdf
That's my best guess. But hopefully someone who actually uses Windows can confirm that this works.
For epsfiles instead change -sDEVICE#pswrite
to -sDEVICE=epswrite
and change hello%G.ps
to hello%G.eps
.
If you're using a batch file instead, use %%G instead of %G everywhere, change the ='s to #'s.
If "hello.pdf" is changed to something with spaces in it, use quotation marks, "hello world.pdf". Same for "hello%G.ps".
On GNU/Linux (or Mac OS X), the corresponding command would be:
for G in {1..3002} ; do gs -dSAFER -dBATCH -dNOPAUSE -dFirstPage=$G -dLastPage=$G -sDEVICE=pswrite -o "hello$G.ps" "hello.pdf" ; done
to have it autocalculate the number of pages to do, if you have seq and the poppler utilities installed (which come by default on Ubuntu, I believe), you could use:
for G in $(seq 1 $(pdfinfo academicregs.pdf | sed -n 's/Pages:[^0-9]*\([0-9]*\).*/\1/p')) ; do gs -dSAFER -dBATCH -dNOPAUSE -dFirstPage=$G -dLastPage=$G -sDEVICE=pswrite -o "hello$G.ps" "hello.pdf" ; done
Those I've tested and they work.
Best Answer
There is PDFjam that brings
pdfnup
and allows you to do basically the same things aspsnup
.