D’log now has a print.css file, so you can print a page / posting / week more easily and cleanly, without sidebar fluff. An IE7-printed page should now look like this…

print.jpg

There’s also a new “Print” button over on the right-hand sidebar. This lets you print up to 100 posts.


For WordPress blog owners to have a recent .sql or .xml backup is a Very Good Thing. But good luck getting .sql and .xml archives into an elegant PDF format, since there seem to be no converters.

But print may be needed by some people, especially since there’s nothing like a paper book for lasting 100 years or more and yet still being instantly accessible. So…

Here’s my simple 10-step Windows “WordPress blog to book” formula:—

1. If your current WordPress theme doesn’t have a simple print.css file included (very few do), then make one.

Here’s the one I’m using for D’log — it’s fairly generic and may work for you (open .css files in WordPad, not Notepad). The print.css file tells WordPress how to style a page when your browser prints it. It cuts out all the sidebar-fluff, and just displays your main postings.

2. Upload your print.css file into the templates directory for whatever WordPress theme you’re using at present.

3. Go to your WordPress dashboard (then click on ‘Presentation’ then ‘Theme Editor’). If you put it in the right folder, a “print.css” should show up in your Theme Editor sidebar.

4. Still in the WordPress dashboard Theme Editor, use it to open the theme item marked “header”. Now paste the following line of code just in front of the head.jpg

codesnip.txt (click to open)

Save your changes.

You just told your blog to use the print.css whenever anyone tries to print a page.

5. While still in your WordPress dashboard, go to ‘Options’ then ‘Reading’, and turn the number of posts displayed up to about 160. Save changes.

This change will mean that, even if you posted five times a day for a month, a monthly view will now contain all your posts for that month. This is the point when you’re really really pleased that you never used the “more…” feature when writing long posts.

6. Now go to your weblog as your visitors see it. View each monthly archive page and wait until it all fully loads (this may take a while) — you should now have in front of you a whole month’s postings on a single scrolling page.

If you don’t post very regularly you may want to change your sidebar code for the archives links-list, from ‘type=monthly’ to ‘type=yearly’. Sadly there is no ‘type=quarterly’ in WordPress. Of course, you can also make PDF files of your categories, although some categories may have more than about 160 postings, which seems to me to be about the maximum safe amount to load into a single browser window if you have lots of images in there too.

7. Now you’re ready to print each monthly archive page. At the top of your browser, first choose “File” / “Page setup…” (which should be above “Print…” in IE7)…

dialog.jpg

…and ensure that the ‘header’ and ‘footer’ items are blank. Like this…

290dial.jpg

In the same dialogue box, you may also want to set the page size to “Letter” if you plan to use Lulu as a book printer. ‘Letter’ is a standard U.S. paper size. You should only need to set these settings once.

8. Now select the main “Print…” option in your browser, and choose to print to a ” Adobe PDF” or to “Microsoft XPS Document Writer”, or to whatever other form of “print to file” you have set up in XP or Vista.

Sadly Word 2007 can’t understand / import XPS files (durh! Microsoft’s flagship software can’t read a flagship Microsoft file format?). Personally I still choose XPS, since it’s what Vista prefers, then later right-click on the XPS file and choose “Convert to Adobe PDF”.

9. Upload your PDF to an affordable print-on-demand service such as Lulu.

10. A printed book of your blog gets delivered to you.

Afterwards, turn the “number of postings to display” back to about 15 — or visitors may complain.


Why archive the blog monthly? If you’re writing a lot (5,000 – 10,000 words a month inc. quotes), you’ll probably find that you want monthly books. So one month = one PDF = one print-on-demand Lulu book. You also have to consider the amount of time it’s going to take to upload a very large PDF file of over 100mb. It’s more manageable monthly or quarterly, and each new book simply slots into the sequence on your bookshelf. For instance, April 08 at D’log was 16,000-words in a 70 page file (would have been £12 as a Lulu colour paperback book, or £14 as a B&W hardback).

Of course, you can use Acrobat’s ‘combine in a PDF’ function to combine your XPS months in any convenient length – 230 pages in each book is about right. I had the whole of D’log printed (1,200 pages, 350,000 words) as five black & white paperbacks, for just…

luluprice.jpg

A 220-page Lulu ‘letter’-sized colour book would be £25 inc postage. So five of those would have been around £125. Ouch. But those with smaller blogs should have to pay less than £40, even for a colour hardback.

Update: Warning — Lulu used TNT couriers for delivery, not the normal postal service! I suggest spending a little more and using Blurb instead, since they use normal post.


Finally, here’s an example of why the above technique is marginally better than going: IE7 / “Edit with Microsoft Office Word”, manually highlight and snip out all the sidebar fluff in Word, and then save as a PDF…

betterthan.jpg

The code in the print.css tries makes sure that what’s happening above — a header on one page, the post on another — doesn’t happen. It also tries to prevent split images. It’s not always perfect, but it’s often better than Word.