# pymupdf/PyMuPDF SLOC report

> As of 2026-11-06 (commit 28b271bbfb42), pymupdf/PyMuPDF contains 83,091 total lines: 66,970 code, 6,831 comments, 9,290 blank, across 51 files in 7 languages (top language: Python 60.7%). Canonical public options (tests, docs and generated files excluded). Counted with tokei via OctoCounts.

pymupdf/PyMuPDF has 66,970 source lines of code out of 83,091 total lines across 51 files, counted with tokei from the main ref at commit 28b271bbfb42 on November 6, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving pymupdf/PyMuPDF to commit 28b271bbfb42, downloading the repository source archive, and counting files selected by the effective rules with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options; an exact reproduction needs the same commit, engine version, and effective counting rules.

## Counting rules and retention

pymupdf/PyMuPDF: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.

## Repository size insights

This is a medium-sized codebase by counted code lines. Code represents 80.6% of all lines, comments represent 8.2%, and the repository averages 1,313 code lines per file. Python accounts for 60.7% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Python | 24 | 48,218 | 40,648 | 2,419 | 5,151 |
| SWIG | 20 | 30,982 | 26,235 | 2,019 | 2,728 |
| C Header | 1 | 222 | 75 | 105 | 42 |
| TOML | 2 | 8 | 8 | 0 | 0 |
| INI | 1 | 4 | 4 | 0 | 0 |
| Markdown | 2 | 641 | 0 | 376 | 265 |
| Plain Text | 1 | 3,016 | 0 | 1,912 | 1,104 |

Top language: Python 60.7%. Generated on November 6, 2026. Canonical report: https://octocounts.com/github/pymupdf/PyMuPDF

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/pymupdf/PyMuPDF/commit/28b271bbfb42d13a084346d255d3b8b2e3b96544?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D&reportId=818551fc6e30cba9f35a6488e74338e5b1a944816e81394b6a5bcbf3134fba70).

## Report FAQ

### How many lines of code does pymupdf/PyMuPDF have?

pymupdf/PyMuPDF has 66,970 lines of code, plus 6,831 comment lines and 9,290 blank lines, for 83,091 total lines at commit 28b271bbfb42 on November 6, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

### How was the pymupdf/PyMuPDF line count measured?

OctoCounts resolved the public GitHub repository to commit 28b271bbfb42, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for pymupdf/PyMuPDF?

This OctoCounts report was generated from main at commit 28b271bbfb42 on November 6, 2026.

## Similar repository reports

- [sepandhaghighi/art](https://octocounts.com/github/sepandhaghighi/art) — Python, 67,002 code lines
- [ScottSloan/Bili23-Downloader](https://octocounts.com/github/ScottSloan/Bili23-Downloader) — Python, 67,325 code lines
- [open-energy-transition/pypsa-eur](https://octocounts.com/github/open-energy-transition/pypsa-eur) — Python, 67,932 code lines
- [myfanhua/turb-gpt-free-register](https://octocounts.com/github/myfanhua/turb-gpt-free-register) — Python, 68,040 code lines
- [vgroenhuis/SOFA_CloSer](https://octocounts.com/github/vgroenhuis/SOFA_CloSer) — Python, 68,196 code lines
- [louislhotte/Manim-animation](https://octocounts.com/github/louislhotte/Manim-animation) — Python, 65,178 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Django vs Ruby on Rails](https://octocounts.com/compare/django-vs-rails)
- [Laravel vs Django](https://octocounts.com/compare/laravel-vs-django)
- [How to count lines of code in a GitHub repository](https://octocounts.com/docs/count-lines-of-code-github)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
- [All OctoCounts guides](https://octocounts.com/docs)
