Create a new PDF page and insert some text. Notes: Function combining Document.new_page() and Page.insert_text(). For parameter details see these methods.
(
doc: Document,
pno: int,
text: typing.Union[str, list, None] = None,
fontsize: float = 11,
width: float = 595,
height: float = 842,
fontname: str = "helv",
fontfile: OptStr = None,
color: OptSeq = (0,),
)
| 1860 | |
| 1861 | |
| 1862 | def insert_page( |
| 1863 | doc: Document, |
| 1864 | pno: int, |
| 1865 | text: typing.Union[str, list, None] = None, |
| 1866 | fontsize: float = 11, |
| 1867 | width: float = 595, |
| 1868 | height: float = 842, |
| 1869 | fontname: str = "helv", |
| 1870 | fontfile: OptStr = None, |
| 1871 | color: OptSeq = (0,), |
| 1872 | ) -> int: |
| 1873 | """Create a new PDF page and insert some text. |
| 1874 | |
| 1875 | Notes: |
| 1876 | Function combining Document.new_page() and Page.insert_text(). |
| 1877 | For parameter details see these methods. |
| 1878 | """ |
| 1879 | page = doc.new_page(pno=pno, width=width, height=height) |
| 1880 | if not bool(text): |
| 1881 | return 0 |
| 1882 | rc = page.insert_text( |
| 1883 | (50, 72), |
| 1884 | text, |
| 1885 | fontsize=fontsize, |
| 1886 | fontname=fontname, |
| 1887 | fontfile=fontfile, |
| 1888 | color=color, |
| 1889 | ) |
| 1890 | return rc |
| 1891 | |
| 1892 | |
| 1893 | def draw_line( |
nothing calls this directly
no test coverage detected
searching dependent graphs…