2021-08-10 15:41:18 +02:00
|
|
|
# CHAPTER 17. Miscellaneous
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def draft(pdf, r, boxes):
|
|
|
|
"""draft(pdf, range, boxes) removes images on the given pages, replacing
|
|
|
|
them with crossed boxes if 'boxes' is true"""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def removeAllText(pdf, r):
|
|
|
|
"""removeAllText(pdf, range) removes all text from the given pages in a
|
|
|
|
given document."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def blackText(pdf, r):
|
|
|
|
"""blackText(pdf, range) blackens all text on the given pages."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def blackLines(pdf, r):
|
|
|
|
"""blackLines(pdf, range) blackens all lines on the given pages."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def blackFills(pdf, r):
|
|
|
|
"""blackFills(pdf, range) blackens all fills on the given pages."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def thinLines(pdf, r, linewidth):
|
|
|
|
"""thinLines(pdf, range, min_thickness) thickens every line less than
|
|
|
|
min_thickness to min_thickness. Thickness given in points."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def copyId(pdf, pdf2):
|
|
|
|
"""copyId(from, to) copies the /ID from one document to another."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def removeId(pdf):
|
|
|
|
"""removeId(pdf) removes a document's /ID"""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def setVersion(pdf, version):
|
|
|
|
"""setVersion(pdf, version) sets the minor version number of a document."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def setFullVersion(pdf, major, minor):
|
|
|
|
"""setFullVersion(pdf, version) sets the major and minor version number of
|
|
|
|
a document."""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def removeDictEntry(pdf, key):
|
|
|
|
"""removeDictEntry(pdf, key) removes any dictionary entry with the given
|
|
|
|
key anywhere in the document"""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def removeClipping(pdf, r):
|
|
|
|
"""removeClipping(pdf, range) removes all clipping from pages in the given
|
|
|
|
range"""
|