(self, page, ctm)
| 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 | # 重载返回指令流 |
no outgoing calls