我想使用基于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
Run Code Online (Sandbox Code Playgroud)
我已经看到文档(其中)UTF-8编码是"预定义的"但我找不到我需要指向的文件.(我已经看过基于XPDF的软件的多个不同下载,但还没有找到它.)
任何指针将不胜感激.
编辑:我在Windows上.
Art*_*sov 10
您应该使用UTF-8来代替utf-8.请参阅pdftotext帮助信息:
$ pdftotext -listenc
Available encodings are:
UCS-2
ASCII7
Latin1
UTF-8
ZapfDingbats
Symbol
Run Code Online (Sandbox Code Playgroud)
证明代码:
$ 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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3547 次 |
| 最近记录: |