Cleaning up

This commit is contained in:
John Whitington
2023-04-13 17:07:55 +01:00
parent 9587169a94
commit 96d6e2472d
114 changed files with 4 additions and 13 deletions

View File

@@ -0,0 +1,34 @@
# CHAPTER 9. Multipage facilities
def twoUp(pdf):
"""Impose a document two up by retaining the existing page
size, scaling pages down."""
def twoUpStack(pdf):
"""Impose a document two up by doubling the page size,
to fit two pages on one."""
def impose(pdf, x, y, fit, columns, rtl, btt, center, margin, spacing, linewidth):
"""impose(pdf, x, y, fit, columns, rtl, btt, center, margin, spacing,
linewidth) imposes a PDF. There are two modes: imposing x * y, or imposing
to fit a page of size x * y. This is controlled by fit. Columns imposes by
columns rather than rows. rtl is right-to-left, btt bottom-to-top. Center
is unused for now. Margin is the margin around the output, spacing the
spacing between imposed inputs."""
def padBefore(pdf, r):
"""Adds a blank page before each page in the given range."""
def padAfter(pdf, r):
"""Adds a blank page after each page in the given range."""
def padEvery(pdf, n):
"""Adds a blank page after every n pages."""
def padMultiple(pdf, n):
"""Adds pages at the end to pad the file to a multiple of n pages in
length."""
def padMultipleBefore(pdf, n):
"""Adds pages at the beginning to pad the file to a
multiple of n pages in length."""