Blowup: a script for making giant posters
blowup.tex is a small script for plain pdfTeX (not
pdfLaTeX, which uses a strict document structure) that blows up PDF, JPEG or PNG
documents pixel-perfectly across multiple pages, with a tunable overlap at the
edges. PDF documents even stay completely vectorized, retaining the tack-sharp fonts
and vector artwork. I wrote this script to create giant multiple-page posters of my
photos, which it does flawlessly.
If you stumbled on this page through Google and are not familiar with TeX, I should explain that it's a free, open source, high quality, ultra-stable typesetting engine used primarily by academia and book publishers. To use this script, you first need to install a so-called TeX distribution. MikTeX is a good one for Windows. Do yourself a favour, learn how to write LaTeX (it's sort of like HTML) and never bother with Microsoft Word again.
If you're looking for something quick and easy, pdfposter does something similar
and does not require TeX. There are tons of other alternatives too. This one is just
my donation.


Left: the original image. Right: the paged PDF.
% Declarations
% -----------------------------------------------------
\newdimen\hoffset
\newdimen\voffset
\newcount\howwide
\newcount\howhigh
\newdimen\pagewidth
\newdimen\pageheight
\newdimen\overlap
\newdimen\totalwidth
\newcount\hoffsetcounter
\newcount\voffsetcounter
\newcount\totaloffsetcounter
\newcount\totaloffsets
% Set the operational parameters. How many pages wide
% should the output be, and what is the overlap between
% pages? Use any unit: 20mm, 1in, -5pt, whatever.
% -----------------------------------------------------
\howwide=5
\overlap=15mm
% You can play with the page height/width all you want.
% Here they're set to landscape A3.
% -----------------------------------------------------
\pagewidth=420mm
\pageheight=297mm
\pdfpagewidth\pagewidth
\pdfpageheight\pageheight
% Vanity ;-)
% -----------------------------------------------------
\pdfinfo {
/Title (Blowup)
/Creator (blowup)
}
\hoffset=\pagewidth
\voffset=\pageheight
\advance\hoffset by -\overlap
\advance\voffset by -\overlap
\totalwidth=\hoffset
\multiply\totalwidth by \howwide
\advance\totalwidth by \overlap
\pdfximage width \totalwidth {YOUR-FILE-HERE.png}
\newbox\picbox
\setbox\picbox=\hbox{\pdfrefximage\pdflastximage}
\howhigh=\ht\picbox
\divide\howhigh by \voffset
\advance\howhigh by 1
\hoffsetcounter=0
\voffsetcounter=0
\totaloffsetcounter=0
\totaloffsets=\howwide
\multiply\totaloffsets by \howhigh
\loop
\pdfhorigin -\hoffset
\pdfvorigin -\voffset
\multiply\pdfhorigin by \hoffsetcounter
\multiply\pdfvorigin by \voffsetcounter
\shipout\copy\picbox
\advance\totaloffsetcounter by 1
\advance\hoffsetcounter by 1
\ifnum\hoffsetcounter=\howwide
\advance\voffsetcounter by 1
\hoffsetcounter=0
\fi
\ifnum\totaloffsetcounter<\totaloffsets\repeat
\end
Usage
Download the script. Put the name of your file in the
script where it says YOUR-FILE-HERE.png. Choose how many pages wide you
want your blowup to be. (Height is calculated automatically.) In Linux, type
pdftex blowup.tex to generate a file named blowup.pdf in the
current directory. In Windows, put this script and your input file in the directory
where pdftex.exe is located, then open a command window, go to the directory, and
type pdftex blowup.tex. You'll find that a file called
blowup.pdf has been created, which is your poster.
There are no output size limits in this script; knock yourself out. Use this script in whatever way you see fit. Maybe some day I'll write an online interface, but if you need your posterized file right now (but uglier), I suggest the Rasterbator.

Last modified: 2009-04-19 at 18:42:26
Contact