Sunday == First Day of the Working Week

On Friday I was recovering the last of the mail from my earlier post and was trying to remember how to use a local file and loopback device to provide me with a filesystem contained in a file. Pretty much, I had a problem whereby I only had ~50mb free on my laptop, but needed to extract ~250mb worth of mail folders. My initial thoughts were to create a file on a network share and use that mounted via loop device. Due to the odd names of the files I had to extract (full of characters that the 2K server didn't like, such as ":") I needed to use an ext[23] filesystem. Unfortunately I couldn't remember exactly how to do the loopback mount (turns out the only bit I got wrong was forgetting I had to dd the file, rather than just touch it) and so ended up culling some of my files to make some room.

It's typical that today on Freshmeat I see an article on Building A Linux Filesystem From An Ordinary File.

Regardless, I am actually working today (shock horror) looking at XSL Formatting Objects and Apache Formatting Objects Processor.

With work, we are currently performing final tests of our new system (still in development) which uses html2ps quite extensively to produce PDF documents from xHTML documents. Unfortunately, it seems that we've stumbled across a subtle bug which causes lines of text to be scaled down seemingly at random.

I've come to the conclusion that that bug is caused by the script calculating the words that can fit on a line based on page width, rather than the width of the block element which contains it. I've fired off an email to the maintainer, but as with all OSS projects, you have to remember that people have work, family, etc. That's not good for us though, considering we're already running slightly behind schedule.

As such, XSL-FO and FOP is our backup Plan B. I'm quite looking forward to getting my hands dirty with a bit of XSL converting our current documents into documents that FOP can process, not to mention getting intimate with the XSL-FO spec. Thankfully, a quick Google yesterday lead me to Chapter 18 of the XML Bible, Second Edition : XSL Formatting Objects which looks to be 60 pages of fairly in depth discussion of XSL-FO. A little out of date perhaps, but should make a good start.

Depending on how well it works, it may actually end up replacing html2ps entirely. It looks quite promising!