claird / PyPDF4

A utility to read and write PDFs with Python
obsolete-https://pythonhosted.org/PyPDF2/
Other
330 stars 61 forks source link

PyPDF4

PyPDF4 is a pure-python PDF library capable of splitting, merging together, cropping, and transforming the pages of PDF files. It can also add custom data, viewing options, and passwords to PDF files. It can retrieve text and metadata from PDFs as well as merge entire files together.

What happened to PyPDF2? Nothing; it's still available at https://github.com/mstamy2/PyPDF2. For various reasons @claird will eventually explain, I've simply decided to mark a new "business model" with a slightly-renamed project name. While PyPDF4 will continue to be available at no charge, I have strong plans for better ongoing support to start in August 2018.

Homepage (available soon): http://claird.github.io/PyPDF4/.

Examples

Please see the samplecode/ folder.

Documentation

Documentation soon will be available, although probably not at https://pythonhosted.org/PyPDF4/.

FAQ

Please see http://claird.github.io/PyPDF4/FAQ.html (available in early August).

Tests

PyPDF4 includes a modest (but growing!) test suite built on the unittest framework. All tests are located in the tests/ folder and are distributed among dedicated modules. Tox makes running all tests over all versions of Python quick work:

python -m pip install tox
python -m tox

Individual tests are accessible as conventional Pytest sources;

pytest -v tests/test_pdf.py

is an example which assumes the pytest executable is activated.

Contributing

For an exhaustive overview of what rules you are expected to maintain, please visit Contributing in the project Wiki. A quick outline of these is: