2022-05-18 18:47:31 +02:00
|
|
|
// CHAPTER 2. Merging and Splitting
|
2022-05-12 17:57:13 +02:00
|
|
|
|
2022-05-18 18:47:31 +02:00
|
|
|
/** Given a list of PDFs, merges the files into a new one, which is returned. */
|
|
|
|
function mergeSimple(pdfs)
|
2022-05-12 17:57:13 +02:00
|
|
|
|
2022-05-18 18:47:31 +02:00
|
|
|
/** Merges the PDFs. If retain_numbering is true page labels are not
|
|
|
|
rewritten. If remove_duplicate_fonts is true, duplicate fonts are merged.
|
|
|
|
This is useful when the source documents for merging originate from the same
|
|
|
|
source. */
|
|
|
|
function merge(pdfs, retain_numbering, remove_duplicate_fonts)
|
2022-05-12 17:57:13 +02:00
|
|
|
|
2022-05-18 18:47:31 +02:00
|
|
|
/** The same as merge, except that it has an additional argument - a list of
|
|
|
|
page ranges. This is used to select the pages to pick from each PDF. This
|
|
|
|
avoids duplication of information when multiple discrete parts of a source PDF
|
|
|
|
are included. */
|
|
|
|
function mergeSame(pdfs, retain_numbering, remove_duplicate_fonts, ranges)
|
2022-05-12 17:57:13 +02:00
|
|
|
|
2022-05-18 18:47:31 +02:00
|
|
|
/** Returns a new document with just those pages in the page range. */
|
|
|
|
function selectPages(pdf, r)
|