Converting PDF text to UTF8

1) When using single date, the datetime_end is now set at the end of the
chosen day, aka 23:59:59
2) When in debugginh mode, the PDF text that is displayed is trimmed
down to 500 characters in order to avoid displaying huge amount of text
when PDF is e.g an e-book.
3) Text extracted from PDF is converted to UTF-8 because json_encode
does not support non-utf characters (we use json for debugging mode).
The same convertion takes place before saving to the database.
4) Minor CSS changes
5) Hiding debugging box when debugging mode is not enabled.