将PDF分为彩色和黑白页面


9

我想将一个大型PDF文档自动拆分为两个文件:一个文件应仅包含具有黑白内容的页面,另一个文件应仅包含具有任何色彩内容的页面。彩色页面和黑白页面不是连续运行的,而是散布在整个文档中。如何自动执行此操作?


拆分的真正原因是什么?您要在两台不同的打印机上进行打印吗?
Serge

@Serge:正确。
SabreWolfy


1
@SabreWolfy-您可能要检查这个问题,因此几乎是相同的。我已经成功地使用sh了答案中的两个脚本。
don_crissti

Answers:


3

克里斯·罗杰斯Chris Rodgers)编写了一个Perl脚本,将PDF文件分为彩色和黑白页面。这是脚本的链接:pdfcolor-1.2.tgz

网站上脚本的工作方式的详细说明:

- Perl script
- uses:
– “pscolor” (C, “using GS DLL as a ps colorpage separator”) by Carsten Hammer
– “joinPDF” (Java, “Command line tool to join and split PDF files”, for mac) by Gerard Briscoe
- Has hardcoded paths in shell scripts “splitPDF” and “joinPDF”
- Depends on flex
- Depends on libgs-dev
- GNU GPL 2.0

How it works:
split PDF into single pages in temporary location
use pscolor to detect whether color is on the page
reassemble pages with color and pages without color into two pdf files.

Does not work when adjusting said hardcoded paths.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.