MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / new_page

Method new_page

src/__init__.py:5888–5904  ·  view source on GitHub ↗

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,
            )

Source from the content-addressed store, hash-verified

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."""

Callers 15

write_textMethod · 0.95
write_textFunction · 0.95
test_3134Function · 0.95
test_htmlbox1Function · 0.95
test_3559Function · 0.95
test_3209Function · 0.95
test_add_ink_annotFunction · 0.95
test_2777Function · 0.95
test_2355Function · 0.95
insert_pageMethod · 0.80
insert_pageFunction · 0.80
test_widgets.pyFile · 0.80

Calls 1

_newPageMethod · 0.80

Tested by 15

test_3134Function · 0.76
test_htmlbox1Function · 0.76
test_3559Function · 0.76
test_3209Function · 0.76
test_add_ink_annotFunction · 0.76
test_2777Function · 0.76
test_2355Function · 0.76
test_textFunction · 0.64
test_checkboxFunction · 0.64
test_listboxFunction · 0.64
test_comboboxFunction · 0.64
test_text2Function · 0.64