Producing a printed newsletter from a Drupal website

The St Margaret's Church website I recently produced was a major upgrade to a previous site I had built for them. One of the sections I was quite keen to improve upon was the newsletter. The newsletter on the website was another way to distribute the newsletter which was given out each week at mass. The newsletter, called the "St Margaret's Page", was produced in MS Publisher by the parish administrator. At the time, the best way to convert it to a format for the website (reliably and quickly every week), was to save it as an image and then allow it to be viewed in a lightbox. Having text displayed as an image is not ideal, it means that:

  • the text cannot be resized.
  • the text cannot be read by a screen reader.
  • the text cannot be searched or picked up by search engines.
  • web links within the text cannot be clicked on.

So, with the new website, I wanted to vastly improve on these issues. The main problem preventing the raw text being entered into the site was that it would be so time consuming to produce newsletter in MS Publisher and then copy each bit of it across onto the website and format it correctly. So instead, what if the whole newsletter was produced on the website so that all the raw text is available for display and then a printable version is available for export. This would allow both formats to be created by only inputting the text in one place.

After investigating a few options, I chose to output the printable version as a PDF. This would produce the most reliably consistent output, independent of computer and browser. Drupal has a great module called PDF using mPDF which I found to be the best option for producing the PDF for printing in this case. This then takes a lot of playing about with, I intend to follow this post up with another describing how I got around various issues when styling content in a PDF.

This solution hasn't come without its problems though. Primarily, I still am to implement a solution to alert the author as to when a section has too much content and has gone over the page. This is a problem which comes with going from the non-restrictive space on a web page, to the very real restriction of space on an A4 printed page. Currently the author will have to create the PDF a few times to check as they make edits to ensure everything fits neatly.

That's just an introduction; I will follow shortly with more blogs on how I implemented this solution.