MCPcopy Index your code
hub / github.com/PDFMathTranslate/PDFMathTranslate / begin_page

Method begin_page

pdf2zh/converter.py:54–60  ·  view source on GitHub ↗
(self, page, ctm)

Source from the content-addressed store, hash-verified

52 PDFConverter.__init__(self, rsrcmgr, None, "utf-8", 1, None)
53
54 def begin_page(self, page, ctm) -> None:
55 # 重载替换 cropbox
56 (x0, y0, x1, y1) = page.cropbox
57 (x0, y0) = apply_matrix_pt(ctm, (x0, y0))
58 (x1, y1) = apply_matrix_pt(ctm, (x1, y1))
59 mediabox = (0, 0, abs(x0 - x1), abs(y0 - y1))
60 self.cur_item = LTPage(page.pageno, mediabox)
61
62 def end_page(self, page):
63 # 重载返回指令流

Callers 2

test_begin_pageMethod · 0.80
process_pageMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_begin_pageMethod · 0.64