gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 07:29:09 27 4
gpt4 key购买 nike

我想使用基于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

关于utf-8 - PDFTOTEXT 输出 UTF-8 格式所需的文件在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20127496/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com