从 pdf 文件中提取结构化文本。
项目描述
叶焦点
从 pdf 文件中提取结构化文本。
安装
使用 pip 从 PyPI 安装:
pip install leaf-focus
下载Xpdf 命令行工具并解压可执行文件。
将包含可执行文件的目录提供为--exe-dir.
用法
usage: leaf-focus [-h] [--version] --exe-dir EXE_DIR [--page-images] [--ocr]
[--first FIRST] [--last LAST]
[--log-level {debug,info,warning,error,critical}]
input_pdf output_dir
Extract structured text from a pdf file.
positional arguments:
input_pdf path to the pdf file to read
output_dir path to the directory to save the extracted text files
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--exe-dir EXE_DIR path to the directory containing xpdf executable files
--page-images save each page of the pdf as a separate image
--ocr run optical character recognition on each page of the
pdf
--first FIRST the first pdf page to process
--last LAST the last pdf page to process
--log-level {debug,info,warning,error,critical}
the log level: debug, info, warning, error, critical
例子
# Extract the pdf information and embedded text.
leaf-focus --exe-dir [path-to-xpdf-exe-dir] file.pdf file-pages
# Extract the pdf information, embedded text, an image of each page, and Optical Character Recognition results of each page.
leaf-focus --exe-dir [path-to-xpdf-exe-dir] file.pdf file-pages --ocr
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
leaf-focus-0.5.0.tar.gz
(24.2 kB
查看哈希)
内置分布
Leaf_focus-0.5.0-py3-none-any.whl
(25.0 kB
视图哈希)
关
Leaf_focus -0.5.0-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | d1521a8a14c5b29f30beccf1a36e2110c3adb63a71f4296d4da7b64117c5e85a |
|
| MD5 | a5e761c10fe8220344594e2f6fd42407 |
|
| 布莱克2-256 | 75693ca305fe3a914325cc65956a703490544cd99df4cf8dfc80cca37c1d431b |