Purple Rain

Prince XML Logo

Prince XML is an application that enables you to create PDFs from HTML documents, using formatting from your print stylesheet. This is handy as browsers don’t really do print very well, and don’t support the CSS selectors that create multi-column layouts.

I first heard about Prince XML in a presentation by Håkon Wium Lie of Opera at the @Media 2007 conference. When I looked into Prince after the conference I didn’t really see its potential for us, as PDFs were something we generally avoided.

I was asked recently to do some further research and came across this presentation on YouTube, as a consequence I see its true capabilities.

So why use it?

We have a lot of fresh and accurate content on our website, so why not use web pages as the source for high quality printed material?

If a print style sheet can manage a layout as effectively as QuarkXPress or Adobe InDesign, when outputted in an automated way through Prince, then that saves a lot of extra work.

In the Prince GUI you select the web document you wish to convert, click Go and it creates the PDF, it’s very simple.

Thinking in Print Terms

As a web designer I’ve learnt to avoid print values when using CSS, like millimetres and points in typography, but there is so much more to think about.

If I’m following instructions from a print designer, I need to be able to format columns, page-breaks, pagination, headers, footers, footnotes, crop-marks, not to mention the mysterious widows and orphans.

Also we will be able reference the typefaces in the Edge Hill style guide that we can’t use on the web.

Some print specific CSS examples

Formatting a page:

@page {
size: A4 landscape;
}

Formatting headers and footers with page numbers:

@page{ size: A4 portrait; margin:1cm;
@top{ content:"BA (hons) Film Studies"}
@bottom{ content: counter(page)}
}

Formatting left and right pages:

@page :left {
margin-left: 4cm;
margin-right: 3cm;
}


@page :right {
margin-left: 3cm;
margin-right: 4cm;
}


Page breaks before specific headings:

H2{page-break-before:always}

Column layouts:

Body{column-count:2}

RGB and CYMK colours

H1 { color: rgb(255,0,0) }
H1 { color: cmyk(0, 100, 50, 0)}

Font Formatting

h1 { font: 28pt "miso-regular"; text-transform:uppercase; border-bottom:thin solid #336699 }

Finally Does it work?

From the experiments I’ve done it seems to work really well, but I won’t be fully confident until I’ve followed real style guidelines to the letter, and received the thumbs up from an experienced print designer.

eXchanging Course Related Information

XCRIThree weeks without a noise from the Web Services blog! How have you coped, dear reader?! We’ve got lots going on with some exciting developments you’ll hear about over the coming few weeks but I’m going to talk about something that’s probably not quite as exciting to most people!

Before Christmas we submitted a proposal for JISC funding for a mini-project looking into implementing and testing the XCRI format. XCRI is an application of XML which is designed for exchanging course information between organisations. For example universities could provide a feed of courses to websites which aggregate course information, reducing the need to retype information.

I’m happy to say that we heard just before the holiday that our proposal was accepted! So now the work begins on integrating XCRI into our systems. This isn’t as hard as it might be – part of the work we’re doing redeveloping the corporate website is on the eProspectus and we’re working on ensuring from the start that all the information required to output valid XCRI feeds is available from the start.

About a week ago I attended the JISC CETIS Joint Portfolio SIG and Enterprise SIG Meeting at Manchester Met. I didn’t really know what to expect but there was a session outlining the XCRI project and developments from last year so I thought it would be useful.

The first morning session was from Peter Rees Jones about ePortfolios and how HE can integrate better with companies. More acronyms than you can shake a stick at, but many interesting thoughts.

Same for John Harrison’s session on “Personal Information Brokerage”. Some obvious comparisons with OpenID, but more than that offers. Edentity clearly think that Education (and delivery companies!) have the capacity to act as a hub for implementing some of the systems they propose. Personally, I suspect that the commercial sector will do more than they give it credit for. Looking at the criteria for selection:

  1. Need for further data sharing
  2. Clear organisational boundaries
  3. Capacity for collective action
  4. Demographics

John marked them down on 3 and 4 but I disagree. If that doesn’t describe Google, Amazon, Yahoo and a bunch of other online companies (including most that get a “Web 2.0” label), I don’t know what does. Okay, standards may be slow to establish at times, but when there’s the will it can happen!

So on to XCRI. There were a few presentations from people explaining the XCRI standard and how its been implemented in institutions. Mark Stubbs gave a good overview of the standard, where it’s come from and where it’s going. I’ve been using a useful diagram handout showing the proposed XCRI-CAP 1.1 schema for the last week to check that what we’re developing for the eProspectus is heading along the right lines.

A few of the last round of XCRI mini projects displayed their work – the University of Bolton probably most closely matching the work we’re doing at Edge Hill. They’ve not yet launched their new site but I’m keeping an eye out for it!

Some of the slides (including those from Selwyn Lloyd of Phosphorix – developers behind CPD Noticeboard) are on the website, so check it out if you’re interested.

>