Fixes #89, using toByteArray instead of bye in ByteArrayOutputStream for PDF upload
Merge branch 'hotfix/1.2.2'