Camera-ready Work on the Web
Obstacles
Compressed PostScript and PDF files have provided a means of distributing any sort of print document for many years, but several things have stood in the way of reading this on screen:
- Screen size/clarity/resolution. No longer an obstice for people with good vision. In order to view full pages the screen resolution really needs to be greater than 100ppi.
- Orientation. Monitors are landscape, and it's even more of a problem with increased popularity of widescreens. I have never seen anyone rotate their screen just to read a PDF.
- Size. PDFs are smaller than PS.GZ which is smaller than plain PS, but it's helpful to know how large the document is before you download it.
- Acroread.exe is slow Don't use it! gv and xpdf take about 1/2 second to start, and they run on anything.
The solution is to reading pre-formatted documents on the web is simple: publish page spreads, as if you were reading an open book.
The gray strips on the top and bottom of the screens represent a best-case senerio for the space consumed by toolbars, window titles, and other UI junk.
| Download 'Creed' | KB |
|---|---|
| Book | 18.6 |
| Book Spread | 17.7 |
| Spread on Letter Paper | 17.8 |
| Spread on A4 Paper | 17.9 |
The book I measured for this example was BSD Hacks by Dru Lavigne. What you're not seeing here is the extra space the book was formatted with before cropping, but even then 11pt text is very readable on my 15" laptop screen running at 1400x1050.
Processing with psutils
Free tip: avoid mpage at all cost. It's a very bad piece of code. psutils is great, although there are a few caviats to using it. First I'll list out the Makefile for the sample document creed and then I'll explain a few of the lines.
default: creed.ps
lout creed > creed.ps
ps2pdf -dDEVICEWIDTH=4320 -dDEVICEHEIGHT=7200 creed.ps creed.pdf
pre: creed.ps
gv creed.ps
all: creed.ps creed-spread.ps creed-spread-letter.ps creed-spread-a4.ps
creed.ps:
lout creed > creed.ps
ps2pdf -dDEVICEWIDTH=4320 -dDEVICEHEIGHT=7200 creed.ps creed.pdf
pre: creed.ps
gv creed.ps
clean:
rm -f *.ld *.li *.pdf *.ps
creed-spread.ps: creed.ps
psselect -p3,4 creed.ps book.ps
psnup -s1 -W432 -H720 -w864 -h720 -2 book.ps | \
sed -e "s/Plain 432 720/Plain 864 720/" > creed-spread.ps
ps2pdf -dDEVICEWIDTH=8640 -dDEVICEHEIGHT=7200 creed-spread.ps creed-spread.pdf
creed-spread-letter.ps: creed-spread.ps
psresize -W864 -H720 -h792 -w612 creed-spread.ps | \
sed -e "s/Plain 864 720/Letter 612 792/" > creed-spread-letter.ps
ps2pdf -sPAPERSIZE=letter creed-spread-letter.ps creed-spread-letter.pdf
creed-spread-a4.ps: creed-spread.ps
psresize -W864 -H720 -h841 -w595 creed-spread.ps | \
sed -e "s/Plain 864 720/A4 595 841/" > creed-spread-a4.ps
ps2pdf -sPAPERSIZE=a4 creed-spread-a4.ps creed-spread-a4.pdf
- ps2pdf always needs to be told what the size of the page is unless the default (depends on how it was installed) is what you want. Use -sPAPERSIZE or -dDEVICEWIDTH/-dDEVICEHEIGHT with dimensions specified in 1/10 point increments.
- psnup or psresize does not alter the %%DocumentMedia: header in the output PostScript, so it is useful to pipe the results into sed in order to correct them. The -w and -h options do adjust the layout, but the paper itself isn't resized.
Here is another example that formats a 5-1/2" by 8-1/2" document in a spread on a landscape Letter paper.
default: letter.ps
lout letter > letter.ps
ps2pdf -dDEVICEWIDTH=3960 -dDEVICEHEIGHT=6120 letter.ps letter.pdf
pre: letter.ps
gv letter.ps
pre2: letter-spread.ps
gv letter-spread.ps
all: letter.ps letter-spread.ps
letter.ps:
lout letter > letter.ps
ps2pdf -dDEVICEWIDTH=3960 -dDEVICEHEIGHT=6120 letter.ps letter.pdf
pre: letter.ps
gv letter.ps
clean:
rm -f *.ld *.li *.pdf *.ps
letter-spread.ps: letter.ps
psnup -W396 -H612 -h792 -w612 -2 letter.ps | \
sed -e "s/Statement 396 612/Letter 612 792/" > letter-spread.ps
ps2pdf -dDEVICEWIDTH=6120 -dDEVICEHEIGHT=7920 letter-spread.ps letter-spread.pdf