← 返回命令列表

Linux command

pdf2json 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert PDF to JSON

pdf2json [input.pdf] [output.json]

Convert first page only

pdf2json -f [1] -l [1] [input.pdf] [output.json]

Include form fields

pdf2json -form [input.pdf] [output.json]

Split pages to separate files

pdf2json -split [input.pdf] [output_prefix]

说明

pdf2json extracts PDF content to JSON format. It captures text, positions, fonts, and form fields, enabling programmatic access to PDF data.

参数

-f _num_
First page.
-l _num_
Last page.
-form
Include form data.
-split
One file per page.
-enc _encoding_
Text encoding.

FAQ

What is the pdf2json command used for?

pdf2json extracts PDF content to JSON format. It captures text, positions, fonts, and form fields, enabling programmatic access to PDF data.

How do I run a basic pdf2json example?

Run `pdf2json [input.pdf] [output.json]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f _num_ do in pdf2json?

First page.