Answers the page with the next page number the document, relative to self. Create a new page if self is the last page in the self.parent document. Answer None if the self page has no parent. >>> from pagebot.document import Document >>> doc = Document(name='TestDoc',
(self)
| 288 | isRight = property(_get_isRight, _set_isRight) |
| 289 | |
| 290 | def _get_next(self): |
| 291 | """Answers the page with the next page number the document, relative to |
| 292 | self. Create a new page if self is the last page in the self.parent |
| 293 | document. Answer None if the self page has no parent. |
| 294 | |
| 295 | >>> from pagebot.document import Document |
| 296 | >>> doc = Document(name='TestDoc', autoPages=8) |
| 297 | >>> page = doc[5] |
| 298 | >>> page.next.pn # Skip any sub-pages with the same page number. |
| 299 | (6, 0) |
| 300 | >>> page.next.next.pn |
| 301 | (7, 0) |
| 302 | >>> page.next.prev is page |
| 303 | True |
| 304 | """ |
| 305 | if self.parent is None: |
| 306 | return None |
| 307 | |
| 308 | return self.parent.nextPage(self) |
| 309 | |
| 310 | next = property(_get_next) |
| 311 |