Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to convert a .doc file to pdf with antiword:

antiword -a a4 pruebaDoc.doc > pruebaDoc.pdf

I get this message "The combination PDF and UTF-8 is not supported"

How can I fix this?

share|improve this question

migrated from stackoverflow.com Jan 18 '12 at 17:02

This question came from our site for professional and enthusiast programmers.

    
This question does not seem to fit at SO for me, it doesn't concern with programming problems. –  Milad Naseri Jan 18 '12 at 16:48

1 Answer 1

See this post here for a Linux solution. This is the wrapper solution that they recommend:

#!/bin/sh

# a shell wrapper to make 'antiword' usage reasonable on UTF-8 systems.
#
# Michal Jaegermann, michal@harddata.com, 2004/Nov/03
#    - simplify and we may be printing on a Postcript printer, 2006/May/08

echo "$@" | egrep -q -w -- '-p|-a' && lang="${LANG%.UTF-8}"
LANG=$lang antiword.bin "$@"
exit

For Windows you can try specifying a specific mapping file using the -m switch:

antiword.exe -a a4 Test.doc -m 8859-1.txt > Test.pdf
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.