UTF-8格式的PDFTOTEXT输出在哪里需要文件?

UTF-8格式的PDFTOTEXT输出在哪里需要文件?,utf-8,pdftotext,Utf 8,Pdftotext,我想使用基于XPDF的PDFTOTEXT命令行工具查看PDF文件,希望获得UTF-8输出。我在StackOverflow上看到过其他人得到它——问题4039930、3809761和13618330表明其他人也能使用它 当我使用选项-enc utf-8时,将显示以下消息: Syntax Error: Couldn't find unicodeMap file for the 'utf-8' encoding Config Error: Couldn't get text encoding 我看过

我想使用基于XPDF的PDFTOTEXT命令行工具查看PDF文件,希望获得UTF-8输出。我在StackOverflow上看到过其他人得到它——问题4039930、3809761和13618330表明其他人也能使用它

当我使用选项
-enc utf-8
时,将显示以下消息:

Syntax Error: Couldn't find unicodeMap file for the 'utf-8' encoding
Config Error: Couldn't get text encoding
我看过一些文档,其中包括UTF-8编码是“预定义的”,但我找不到需要指向的文件。(我已经看过多个不同的基于XPDF的软件下载,但还没有找到。)

任何指点都将不胜感激


编辑:我在Windows上。

您应该使用
UTF-8
而不是
UTF-8
。请参阅
pdftotext
帮助消息:

$ pdftotext -listenc
Available encodings are:
UCS-2
ASCII7
Latin1
UTF-8
ZapfDingbats
Symbol
证明代码:

$ pdftotext -eol unix -nopgbrk -layout -enc utf-8 file.pdf
Syntax Error: Couldn't find unicodeMap file for the 'utf-8' encoding
Command Line Error: Couldn't get text encoding
$ pdftotext -eol unix -nopgbrk -layout -enc UTF-8 file.pdf
$ echo $?
0