Fix exception when printing unicode characters

Small fix. Sometimes during "Export table to PDF" action my customers experienced Unicode error. This fixed it.

`template.render(**context)` usually returns utf-8 encoded string, but not every time. So this conversion makes sure it is utf-8.