METADATA 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. Metadata-Version: 2.4
  2. Name: pypdf
  3. Version: 6.9.2
  4. Summary: A pure-python PDF library capable of splitting, merging, cropping, and transforming PDF files
  5. Author-email: Mathieu Fenniak <biziqe@mathieu.fenniak.net>
  6. Maintainer: stefan6419846
  7. Maintainer-email: Martin Thoma <info@martin-thoma.de>
  8. Requires-Python: >=3.9
  9. Description-Content-Type: text/markdown
  10. License-Expression: BSD-3-Clause
  11. Classifier: Development Status :: 5 - Production/Stable
  12. Classifier: Intended Audience :: Developers
  13. Classifier: Programming Language :: Python :: 3
  14. Classifier: Programming Language :: Python :: 3 :: Only
  15. Classifier: Programming Language :: Python :: 3.9
  16. Classifier: Programming Language :: Python :: 3.10
  17. Classifier: Programming Language :: Python :: 3.11
  18. Classifier: Programming Language :: Python :: 3.12
  19. Classifier: Programming Language :: Python :: 3.13
  20. Classifier: Programming Language :: Python :: 3.14
  21. Classifier: Operating System :: OS Independent
  22. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  23. Classifier: Typing :: Typed
  24. License-File: LICENSE
  25. Requires-Dist: typing_extensions >= 4.0; python_version < '3.11'
  26. Requires-Dist: cryptography ; extra == "crypto"
  27. Requires-Dist: PyCryptodome ; extra == "cryptodome"
  28. Requires-Dist: flit ; extra == "dev"
  29. Requires-Dist: pip-tools ; extra == "dev"
  30. Requires-Dist: pre-commit ; extra == "dev"
  31. Requires-Dist: pytest-cov ; extra == "dev"
  32. Requires-Dist: pytest-socket ; extra == "dev"
  33. Requires-Dist: pytest-timeout ; extra == "dev"
  34. Requires-Dist: pytest-xdist ; extra == "dev"
  35. Requires-Dist: wheel ; extra == "dev"
  36. Requires-Dist: myst_parser ; extra == "docs"
  37. Requires-Dist: sphinx ; extra == "docs"
  38. Requires-Dist: sphinx_rtd_theme ; extra == "docs"
  39. Requires-Dist: cryptography ; extra == "full"
  40. Requires-Dist: Pillow>=8.0.0 ; extra == "full"
  41. Requires-Dist: Pillow>=8.0.0 ; extra == "image"
  42. Project-URL: Bug Reports, https://github.com/py-pdf/pypdf/issues
  43. Project-URL: Changelog, https://pypdf.readthedocs.io/en/latest/meta/CHANGELOG.html
  44. Project-URL: Documentation, https://pypdf.readthedocs.io/en/latest/
  45. Project-URL: Source, https://github.com/py-pdf/pypdf
  46. Provides-Extra: crypto
  47. Provides-Extra: cryptodome
  48. Provides-Extra: dev
  49. Provides-Extra: docs
  50. Provides-Extra: full
  51. Provides-Extra: image
  52. [![PyPI version](https://badge.fury.io/py/pypdf.svg)](https://badge.fury.io/py/pypdf)
  53. [![Python Support](https://img.shields.io/pypi/pyversions/pypdf.svg)](https://pypi.org/project/pypdf/)
  54. [![](https://img.shields.io/badge/-documentation-green)](https://pypdf.readthedocs.io/en/stable/)
  55. [![GitHub last commit](https://img.shields.io/github/last-commit/py-pdf/pypdf)](https://github.com/py-pdf/pypdf)
  56. [![codecov](https://codecov.io/gh/py-pdf/pypdf/branch/main/graph/badge.svg?token=id42cGNZ5Z)](https://codecov.io/gh/py-pdf/pypdf)
  57. # pypdf
  58. pypdf is a free and open-source pure-python PDF library capable of splitting,
  59. [merging](https://pypdf.readthedocs.io/en/stable/user/merging-pdfs.html),
  60. [cropping, and transforming](https://pypdf.readthedocs.io/en/stable/user/cropping-and-transforming.html)
  61. the pages of PDF files. It can also add
  62. custom data, viewing options, and
  63. [passwords](https://pypdf.readthedocs.io/en/stable/user/encryption-decryption.html)
  64. to PDF files. pypdf can
  65. [retrieve text](https://pypdf.readthedocs.io/en/stable/user/extract-text.html)
  66. and
  67. [metadata](https://pypdf.readthedocs.io/en/stable/user/metadata.html)
  68. from PDFs as well.
  69. See [pdfly](https://github.com/py-pdf/pdfly) for a CLI application that uses pypdf to interact with PDFs.
  70. ## Installation
  71. Install pypdf using pip:
  72. ```
  73. pip install pypdf
  74. ```
  75. For using pypdf with AES encryption or decryption, install extra dependencies:
  76. ```
  77. pip install pypdf[crypto]
  78. ```
  79. > **NOTE**: `pypdf` 3.1.0 and above include significant improvements compared to
  80. > previous versions. Please refer to [the migration
  81. > guide](https://pypdf.readthedocs.io/en/latest/user/migration-1-to-2.html) for
  82. > more information.
  83. ## Usage
  84. ```python
  85. from pypdf import PdfReader
  86. reader = PdfReader("example.pdf")
  87. number_of_pages = len(reader.pages)
  88. page = reader.pages[0]
  89. text = page.extract_text()
  90. ```
  91. pypdf can do a lot more, e.g. splitting, merging, reading and creating annotations, decrypting and encrypting. Check out the
  92. [documentation](https://pypdf.readthedocs.io/en/stable/) for additional usage
  93. examples!
  94. For questions and answers, visit
  95. [StackOverflow](https://stackoverflow.com/questions/tagged/pypdf)
  96. (tagged with [pypdf](https://stackoverflow.com/questions/tagged/pypdf)).
  97. ## Contributions
  98. Maintaining pypdf is a collaborative effort. You can support the project by
  99. writing documentation, helping to narrow down issues, and submitting code.
  100. See the [CONTRIBUTING.md](https://github.com/py-pdf/pypdf/blob/main/CONTRIBUTING.md) file for more information.
  101. ### Q&A
  102. The experience pypdf users have covers the whole range from beginner to expert. You can contribute to the pypdf community by answering questions
  103. on [StackOverflow](https://stackoverflow.com/questions/tagged/pypdf),
  104. helping in [discussions](https://github.com/py-pdf/pypdf/discussions),
  105. and asking users who report issues for [MCVE](https://stackoverflow.com/help/minimal-reproducible-example)'s (Code + example PDF!).
  106. ### Issues
  107. A good bug ticket includes a MCVE - a minimal complete verifiable example.
  108. For pypdf, this means that you must upload a PDF that causes the bug to occur
  109. as well as the code you're executing with all of the output. Use
  110. `print(pypdf.__version__)` to tell us which version you're using.
  111. ### Code
  112. All code contributions are welcome, but smaller ones have a better chance to
  113. get included in a timely manner. Adding unit tests for new features or test
  114. cases for bugs you've fixed help us to ensure that the Pull Request (PR) is fine.
  115. pypdf includes a test suite which can be executed with `pytest`:
  116. ```bash
  117. $ pytest
  118. ===================== test session starts =====================
  119. platform linux -- Python 3.6.15, pytest-7.0.1, pluggy-1.0.0
  120. rootdir: /home/moose/GitHub/Martin/pypdf
  121. plugins: cov-3.0.0
  122. collected 233 items
  123. tests/test_basic_features.py .. [ 0%]
  124. tests/test_constants.py . [ 1%]
  125. tests/test_filters.py .................x..... [ 11%]
  126. tests/test_generic.py ................................. [ 25%]
  127. ............. [ 30%]
  128. tests/test_javascript.py .. [ 31%]
  129. tests/test_merger.py . [ 32%]
  130. tests/test_page.py ......................... [ 42%]
  131. tests/test_pagerange.py ................ [ 49%]
  132. tests/test_papersizes.py .................. [ 57%]
  133. tests/test_reader.py .................................. [ 72%]
  134. ............... [ 78%]
  135. tests/test_utils.py .................... [ 87%]
  136. tests/test_workflows.py .......... [ 91%]
  137. tests/test_writer.py ................. [ 98%]
  138. tests/test_xmp.py ... [100%]
  139. ========== 232 passed, 1 xfailed, 1 warning in 4.52s ==========
  140. ```