cpdf-source/pysplits/c03.tex

21 lines
908 B
TeX
Raw Normal View History

2021-08-10 15:41:18 +02:00
# CHAPTER 2. Merging and Splitting
2021-07-26 20:50:33 +02:00
2021-08-10 15:41:18 +02:00
def mergeSimple(pdfs):
2021-09-01 19:41:10 +02:00
"""Given a list of PDFs, merges the documents into a new PDF, which is
returned."""
2021-07-26 20:50:33 +02:00
2021-08-10 15:41:18 +02:00
def merge(pdfs, retain_numbering, remove_duplicate_fonts):
2021-09-01 19:41:10 +02:00
"""Merges the list of PDFs. If retain_numbering is True page labels are not
2021-08-10 15:41:18 +02:00
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."""
2021-07-26 20:50:33 +02:00
2021-08-10 15:41:18 +02:00
def mergeSame(pdfs, retain_numbering, remove_duplicate_fonts, ranges):
2021-09-01 19:41:10 +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
2021-08-10 15:41:18 +02:00
each PDF. This avoids duplication of information when multiple discrete
2021-09-01 19:41:10 +02:00
parts of a single source PDF are included."""
2021-07-26 20:50:33 +02:00
2021-08-10 15:41:18 +02:00
def selectPages(pdf, r):
2021-09-01 19:41:10 +02:00
""" Returns a new document which just those pages in the page range."""