PHP pre 5.4 support + Convert to PDF

Hi,

I've just replaced the [] array notation with array() to support php 5.3.

I needed support for converting to PDF, I modified the code to allow this.

Jeroen