pdftk can be used to split a PDF file and extract bookmark page numbers.
To get bookmark page numbers, do
pdftk in.pdf dump_data
and make your script to read the page numbers from the output.
Then use
pdftk in.pdf cat AB output out_A-B.pdf
to get pages from A to B in out_A-B.pdf.
The script might be something like this:
#!/bin/bash infile=$1
Tuomas
source share