def __init__(self, document, page, prefix, fill, start):
"""
Represents a page within a document that will be bates numbered.
Args:
document (Marisol.Document): Parent document
page (PyPdf2.pdf.PageObject): PDF page associated with this page
prefix (str): Bates number prefix.
fill (int): Length to zero-pad number to.
start (int): Number to start with.
"""
self.document = document
self.page = page
self.prefix = prefix
self.fill = fill
self.start = start
self.height = float(self.page.mediaBox.upperRight[1])
self.width = float(self.page.mediaBox.lowerRight[0])
self.canvas_file = io.BytesIO()
self.canvas = canvas.Canvas(self.canvas_file, pagesize=(self.width, self.height))
self.redactions = []
评论列表
文章目录