I’ve been doing some work for a friend on the “what goes around comes around” principle. Well it came around. My friend called me on Friday saying he was in town and asking if I wanted a lift back to my car (remember the bike is still off the road so I’m commuting on the train). Sure I said. He arrived half an hour or so later and I jumped in the car. He smiled and handed me a 1gig shuffle to say thanks. What a cool toy.
Back in December I was unfortunate enough to come toddling around a rather long corner just after a nice shinny BMW 7 Series had blown a radiator hose and sprayed coolant all over the road. I leaned into the corner and that’s all she wrote. The front wheel hit the coolant, jumped out from underneath me and down the bike and I went. To rub salt into the wound the fire-brigade arrived as I was picking myself and the bike up to cover up the spill. If only I’d had a nice hit cup of tea before leaving home.
With a little help from a “jimmy bar” I was able to bend the gear leaver back into place. So after exchanging details with the fire-brigade and the driver of the beemer I limped the bike home. On the surface it looked pretty minor, indicator, some faring damage maybe the handlebars, I was feeling optimistic. I might be off the road for a couple of weeks (it was around christmas) but I would still get plenty of riding in for the summer. I dropped it into the repair shop the next day, it’s been there ever since.
Well it looks as though I’ll finally be getting my bike back tomorrow. Summer has been and gone but soon I’ll be free of train timetables, smelly comuters, pushy people committed getting past you and on to the train in the vain attempt to find a seat. I’m even going to be able to ride to the super bikes in two weeks time. I’m felling very optimistic.
Update
I wont be getting the bike back until Monday now. Apparently the paint has to dry. :’(
In my experience there are a two well known libraries for generating PDFs using java, iText and FOP.
FOP is an XSL:FO implemenation. The only time I really use FO is to convert docbook files to PDF. FO doesn’t really suite the sort of page generation that I’m interested in.
I’ve used iText alot in the past but as time rolls on I find that I’m more and more disapointed in it. Don’t get me wrong, it works. My issue is that it’s really badly put together. If iText doesn’t do something the way you want it to you need to write the raw PDF using the PdfContentByte. There seems to be very little thought put into the layers of abstraction. By the time I’ve done the things I needed to do most of my code consists of calls to a PdfContentByte instance. It’s close to writing PDF by hand. I get some page and XObject managment but that’s about it.
So I was considering writing my own library, then I came across PDFBox. PDFBox isn’t as all encompassing as iText but it does have some really nice layers of seperation. It layers PDF “objects” like page, font etc, upon a series of low level objects like dictionary, number and array. This is precisely what is on my whiteboard at home. It also has explicit support for reading and extracting information from PDF files (it even comes with a Lucene indexer). I’ve walked the source and done a couple of small tests and it looks pretty good.
Harley, my old, gentle, friend past away last night. Her spot in the hall is empty now, her bed cold. She filled out lives with memories and warmed our hearts with her unconditional love and stoic support. She’ll be greatly missed and well remembered.
Recent Comments