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

Method chapter_page_count

src/__init__.py:4265–4273  ·  view source on GitHub ↗

Page count of chapter.

(self, chapter)

Source from the content-addressed store, hash-verified

4263 return mupdf.fz_count_chapters( self.this)
4264
4265 def chapter_page_count(self, chapter):
4266 """Page count of chapter."""
4267 if self.is_closed:
4268 raise ValueError("document closed")
4269 chapters = mupdf.fz_count_chapters( self.this)
4270 if chapter < 0 or chapter >= chapters:
4271 raise ValueError( "bad chapter number")
4272 pages = mupdf.fz_count_chapter_pages( self.this, chapter)
4273 return pages
4274
4275 def close(self):
4276 """Close document."""

Callers 2

__contains__Method · 0.95
test_pageidsFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_pageidsFunction · 0.64