Create and return a new page object. Args: pno: (int) insert before this page. Default: after last page. width: (float) page width in points. Default: 595 (ISO A4 width). height: (float) page height in points. Default 842 (ISO A4 height). Returns:
(
doc: 'Document',
pno: int = -1,
width: float = 595,
height: float = 842,
)
| 5886 | return ret |
| 5887 | |
| 5888 | def new_page( |
| 5889 | doc: 'Document', |
| 5890 | pno: int = -1, |
| 5891 | width: float = 595, |
| 5892 | height: float = 842, |
| 5893 | ) -> Page: |
| 5894 | """Create and return a new page object. |
| 5895 | |
| 5896 | Args: |
| 5897 | pno: (int) insert before this page. Default: after last page. |
| 5898 | width: (float) page width in points. Default: 595 (ISO A4 width). |
| 5899 | height: (float) page height in points. Default 842 (ISO A4 height). |
| 5900 | Returns: |
| 5901 | A pymupdf.Page object. |
| 5902 | """ |
| 5903 | doc._newPage(pno, width=width, height=height) |
| 5904 | return doc[pno] |
| 5905 | |
| 5906 | def next_location(self, page_id): |
| 5907 | """Get (chapter, page) of next page.""" |