{"id":26922594,"url":"https://github.com/mstamy2/PyPDF2","last_synced_at":"2025-04-02T00:04:04.869Z","repository":{"id":2172819,"uuid":"3119517","full_name":"py-pdf/pypdf","owner":"py-pdf","description":"A pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files","archived":false,"fork":false,"pushed_at":"2024-10-27T19:51:06.000Z","size":20336,"stargazers_count":8259,"open_issues_count":91,"forks_count":1399,"subscribers_count":147,"default_branch":"main","last_synced_at":"2024-10-29T21:26:38.989Z","etag":null,"topics":["help-wanted","pdf","pdf-documents","pdf-manipulation","pdf-parser","pdf-parsing","pypdf2","python"],"latest_commit_sha":null,"homepage":"https://pypdf.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/py-pdf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-01-06T17:13:38.000Z","updated_at":"2024-10-29T12:25:31.000Z","dependencies_parsed_at":"2023-09-26T22:27:18.098Z","dependency_job_id":"819b4aba-48ca-4f26-81cd-259f809dfd20","html_url":"https://github.com/py-pdf/pypdf","commit_stats":{"total_commits":1638,"total_committers":246,"mean_commits":6.658536585365853,"dds":0.5628815628815629,"last_synced_commit":"9f647e696b64f34262a637b77f9a7e89d75a22f4"},"previous_names":["py-pdf/pypdf2","mstamy2/pypdf2"],"tags_count":113,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-pdf%2Fpypdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-pdf%2Fpypdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-pdf%2Fpypdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-pdf%2Fpypdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/py-pdf","download_url":"https://codeload.github.com/py-pdf/pypdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246258867,"owners_count":20748573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["help-wanted","pdf","pdf-documents","pdf-manipulation","pdf-parser","pdf-parsing","pypdf2","python"],"created_at":"2025-04-02T00:03:18.169Z","updated_at":"2025-04-02T00:04:04.851Z","avatar_url":"https://github.com/py-pdf.png","language":"Python","readme":"[![PyPI version](https://badge.fury.io/py/pypdf.svg)](https://badge.fury.io/py/pypdf)\n[![Python Support](https://img.shields.io/pypi/pyversions/pypdf.svg)](https://pypi.org/project/pypdf/)\n[![](https://img.shields.io/badge/-documentation-green)](https://pypdf.readthedocs.io/en/stable/)\n[![GitHub last commit](https://img.shields.io/github/last-commit/py-pdf/pypdf)](https://github.com/py-pdf/pypdf)\n[![codecov](https://codecov.io/gh/py-pdf/pypdf/branch/main/graph/badge.svg?token=id42cGNZ5Z)](https://codecov.io/gh/py-pdf/pypdf)\n\n# pypdf\n\npypdf is a free and open-source pure-python PDF library capable of splitting,\n[merging](https://pypdf.readthedocs.io/en/stable/user/merging-pdfs.html),\n[cropping, and transforming](https://pypdf.readthedocs.io/en/stable/user/cropping-and-transforming.html)\nthe pages of PDF files. It can also add\ncustom data, viewing options, and\n[passwords](https://pypdf.readthedocs.io/en/stable/user/encryption-decryption.html)\nto PDF files. pypdf can\n[retrieve text](https://pypdf.readthedocs.io/en/stable/user/extract-text.html)\nand\n[metadata](https://pypdf.readthedocs.io/en/stable/user/metadata.html)\nfrom PDFs as well.\n\nSee [pdfly](https://github.com/py-pdf/pdfly) for a CLI application that uses pypdf to interact with PDFs.\n\n## Installation\n\nInstall pypdf using pip:\n\n```\npip install pypdf\n```\n\nFor using pypdf with AES encryption or decryption, install extra dependencies:\n\n```\npip install pypdf[crypto]\n```\n\n\u003e **NOTE**: `pypdf` 3.1.0 and above include significant improvements compared to\n\u003e previous versions. Please refer to [the migration\n\u003e guide](https://pypdf.readthedocs.io/en/latest/user/migration-1-to-2.html) for\n\u003e more information.\n\n## Usage\n\n```python\nfrom pypdf import PdfReader\n\nreader = PdfReader(\"example.pdf\")\nnumber_of_pages = len(reader.pages)\npage = reader.pages[0]\ntext = page.extract_text()\n```\n\npypdf can do a lot more, e.g. splitting, merging, reading and creating annotations, decrypting and encrypting. Check out the\n[documentation](https://pypdf.readthedocs.io/en/stable/) for additional usage\nexamples!\n\nFor questions and answers, visit\n[StackOverflow](https://stackoverflow.com/questions/tagged/pypdf)\n(tagged with [pypdf](https://stackoverflow.com/questions/tagged/pypdf)).\n\n## Contributions\n\nMaintaining pypdf is a collaborative effort. You can support the project by\nwriting documentation, helping to narrow down issues, and submitting code.\nSee the [CONTRIBUTING.md](https://github.com/py-pdf/pypdf/blob/main/CONTRIBUTING.md) file for more information.\n\n### Q\u0026A\n\nThe experience pypdf users have covers the whole range from beginner to expert. You can contribute to the pypdf community by answering questions\non [StackOverflow](https://stackoverflow.com/questions/tagged/pypdf),\nhelping in [discussions](https://github.com/py-pdf/pypdf/discussions),\nand asking users who report issues for [MCVE](https://stackoverflow.com/help/minimal-reproducible-example)'s (Code + example PDF!).\n\n\n### Issues\n\nA good bug ticket includes a MCVE - a minimal complete verifiable example.\nFor pypdf, this means that you must upload a PDF that causes the bug to occur\nas well as the code you're executing with all of the output. Use\n`print(pypdf.__version__)` to tell us which version you're using.\n\n### Code\n\nAll code contributions are welcome, but smaller ones have a better chance to\nget included in a timely manner. Adding unit tests for new features or test\ncases for bugs you've fixed help us to ensure that the Pull Request (PR) is fine.\n\npypdf includes a test suite which can be executed with `pytest`:\n\n```bash\n$ pytest\n===================== test session starts =====================\nplatform linux -- Python 3.6.15, pytest-7.0.1, pluggy-1.0.0\nrootdir: /home/moose/GitHub/Martin/pypdf\nplugins: cov-3.0.0\ncollected 233 items\n\ntests/test_basic_features.py ..                         [  0%]\ntests/test_constants.py .                               [  1%]\ntests/test_filters.py .................x.....           [ 11%]\ntests/test_generic.py ................................. [ 25%]\n.............                                           [ 30%]\ntests/test_javascript.py ..                             [ 31%]\ntests/test_merger.py .                                  [ 32%]\ntests/test_page.py .........................            [ 42%]\ntests/test_pagerange.py ................                [ 49%]\ntests/test_papersizes.py ..................             [ 57%]\ntests/test_reader.py .................................. [ 72%]\n...............                                         [ 78%]\ntests/test_utils.py ....................                [ 87%]\ntests/test_workflows.py ..........                      [ 91%]\ntests/test_writer.py .................                  [ 98%]\ntests/test_xmp.py ...                                   [100%]\n\n========== 232 passed, 1 xfailed, 1 warning in 4.52s ==========\n```\n","funding_links":[],"categories":["Specific Formats Processing","资源列表","特定格式处理","Text Processing","Python","PYTHON","Products","Specific Formats Processing [🔝](#readme)","📚 فهرست","Awesome Python"],"sub_categories":["特殊文本格式处理","Knowledge Graphs","Python libraries","کار با pdf","Specific Formats Processing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstamy2%2FPyPDF2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstamy2%2FPyPDF2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstamy2%2FPyPDF2/lists"}