Chris Rodgers escreveu um script em Perl para dividir um arquivo PDF em páginas coloridas e em preto / branco. O script é disponível aqui .
Explicação detalhada de como o script funciona no site:
- 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.