pdf - 在 UNIX 中以编程方式将 pdf 页面拆分为它们自己的 pdf

标签 pdf split

我正在尝试编写一个程序,它将一个 .pdf 文件作为输入,并在 UNIX 命令行中将每个页面分隔成它们自己的 .pdf 文件。我已经尝试过 SplitPdf,但由于某种原因,我不断收到错误。

更新:我已经尝试过 pdftk,但它的性能很差,而且对 pdf 文件的大小有限制。

最佳答案

使用pdftk .

burst 命令就是您所追求的。

手册页部分:http://www.pdflabs.com/docs/pdftk-man-page/#dest-op-burst

burst

Splits a single, input PDF document into individual pages. Also creates a report named doc_data.txt which is the same as the output from dump_data. If the output section is omitted, then PDF pages arenamed: pg_%04d.pdf, e.g.: pg_0001.pdf, pg_0002.pdf, etc. To name these pages yourself, supply a printf-styled format string in the output section. For example, if you want pages named: page_01.pdf, page_02.pdf, etc.,pass output page_%02d.pdf to pdftk.

Encryption can be applied to the output by appending output options such as owner_pw, e.g.: pdftk in.pdf burst owner_pw foopass

关于pdf - 在 UNIX 中以编程方式将 pdf 页面拆分为它们自己的 pdf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4621947/

相关文章:

java - 有没有办法让 solr 返回 pdf 并突出显示查询匹配项?

pdf - Bootstrap 3 - 打印/PDF

unix split 跳过前 n 行

java - 使用 Apache PDFBox 从 PDF 文件中删除加密

pdf - Ghostscript 将 pdf 转换为文本文件,输出不可读

PDF Kable 重叠条纹/突出显示

java - 在 Java 中拆分和合并大文件(大小以 GB 为单位)

java - 通过换行问题拆分字符串

C++ - 通过正则表达式分割字符串

java - 拆分多个定界符但将定界符保留在同一字符串上