I solved this by using --binary switch and UTF-8 encoded file as input.
PDF417 with croatian characters - not working