I renamed one of my pdf files to book.pdf .
Then I sucessfully had extracted the first 55 pages of book.pdf into
booka.pdf by the program pdftk by using a file-handle named "B".
I used the command-line below -- I didn't use a space between
the "B" and the range "1-55" of pages that should come from
file "B:
pdftk B=book.pdf cat B1-55 output booka.pdf
Then I extracted the pages 56-105 into bookb.pdf:
pdftk B=book.pdf cat B56-105 output bookb.pdf
Then I extracted everything from page 106 to the
last page into bookc.pdf:
pdftk B=book.pdf cat B106-end output bookc.pdf
In order to do this successfully, you/pdftk must have permission
both to modify and to concatenate the file book.pdf.
In case you/pdftk does not have these permissions, an error-message
will occur and booka.pdf will not be created. For changing/setting these
permissions, the owner-password of book.pdf is needed.
I used
pdftk 1.12 a Handy Tool for Manipulating PDF Documents
Copyright (C) 2003-04, Sid Steward
on a virtual machine that runs Microsoft Windows 95.
I obtained the info about the usage of pdftk from
<
http://www.lagotzki.de/pdftk/>
which is a German-language-page about pdftk.
---------------------------------------------------------------
When using pdftk. I had to specify "by hand" the range
of pages/amount of pages that should go into a pdf-file.
I did not find a solution for having a pdf file split into
chunks of e.g. 50 pages automatically by means of pdftk.
But I stumbled over the
"Coherent PDF Command Line Tools Community Release"
which can be found at
<
http://community.coherentpdf.com/>
and which brings along the program cpdf for many different
computer-platforms.
Using the Windows-binary cpdf.exe under a virtual machine running
Windows 7, I could successfully split the file book.pdf, which consists
of 163 pages, into "chunks" of, e.g., at most 50 pages.
In order to do this, I started the Windows command-line-shell and
entered the command
cpdf book.pdf -split -chunk 50 -o book%%%.pdf
Here "50" denotes the amount of pages per pdf file.
"%%%" denotes the numeric-part of the names of the
pdf files that are to be created during the loop and denotes
a natural number consisting of 3 digits.
The file book.pdf contained 163 pages.
I obtained a file book001.pdf containing the pages 1-50.
I obtained a file book002.pdf containing the pages 51-100.
I obtained a file book003.pdf containing the pages 101-150.
I obtained a file book004.pdf containing the pages 151-163.
---------------------------------------------------------------
In case you prefer to split according to file-size instead of
amount of pages, the following link might be of interest to
you as well:
<
http://unix.stackexchange.com/questions/75496/splitting-large-pdf-into-small-files>
---------------------------------------------------------------
I don't know what will happen in case pdftk or cpdf are
used for splitting pdf-files that contain, e.g.,
- hyperlinks (from table of contents to headline in the text; from
list of tables/figures to caption; from index to text) created via
hyperref-package or
- file-attachments attached via attachfile/attachfil2-package
- or the like.
Sincerely
Ulrich