How did you solve this? I used firebug and a little js / canvas. var newCanvas = document.createElement('canvas'); newCanvas.height="100"; newCanvas.width="300"; document.body.appendChild(newCanvas); var ctx = newCanvas.getContext("2d"); pre = $('pre').innerHTML.replace...