Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
4819397
Prevent infinite loop in readObject() function. Patch by dhudson1. Cl…
Aug 18, 2015
098394a
/DCTDecode stream data
sylvainpelissier Dec 5, 2015
7b591a2
JPEG sample
sylvainpelissier Dec 5, 2015
39de327
JPEG 2000 filter added
sylvainpelissier Dec 10, 2015
ba3da42
Extract images from PDF without resampling or altering.
maphew Jan 6, 2016
eeb2b65
Fails with "ValueError: not enough image data"
maphew Jan 6, 2016
c83cbd8
Merge pull request #1 from maphew/master
sylvainpelissier Jan 7, 2016
7bc62cd
PDF extraction error handling
sylvainpelissier Jan 13, 2016
19a8872
Testing
sylvainpelissier Jan 13, 2016
efae6bc
Update README.md
sylvainpelissier Jan 13, 2016
1273824
Add CCITTFax Decode and JPEG test
sylvainpelissier Jan 21, 2016
b0ace62
Correct test for python3
sylvainpelissier Jan 21, 2016
78fd8c6
Merge pull request #261 from speedplane/feature/readInlineImageEIQFea…
mstamy2 May 15, 2016
5735cb7
Version 1.26.0 update
May 18, 2016
b030b7f
Read Indirect Objects with a sign, fixes #248
mstamy2 May 19, 2016
26e5077
Appropriate error message for closed file, warn when returning null o…
mstamy2 May 19, 2016
5bbd5af
Python 3 type fixes in LZWDecode
mstamy2 May 23, 2016
ce5f7ec
Added URI linking
JohnMulligan Jun 13, 2016
036789a
Write binary data comment
Jun 30, 2016
60dff8d
Add support for PNG filters average and paeth
manuelzs Aug 12, 2016
60abb83
Fix filter type 3 and 4 byte range
juanpgaviria Aug 12, 2016
6f284de
Merge pull request #283 from manuelzs/support_for_png_average_and_pae…
mstamy2 Aug 15, 2016
0208955
Merge branch 'URI-linking' of https://github.com/JohnMulligan/PyPDF2 …
mstamy2 Aug 17, 2016
ad90b69
Fixed TabError in Py3
mstamy2 Aug 17, 2016
fe934cc
Merge branch 'JohnMulligan-URI-linking'
mstamy2 Aug 17, 2016
4fc7f9d
Merge pull request #223 from fgeek/fix-dos-issue
mstamy2 Aug 17, 2016
d7f5eaf
speed up escape sequences
oscardssmith Aug 22, 2016
e9d0b86
README.md: fix sample code directory name
optimojordan Sep 27, 2016
8ba44f2
Fix PdfFileMerger for file objects on Python 3.
mluszczyk Oct 21, 2016
77629e6
Correct name error
mstamy2 Nov 1, 2016
a1bfced
Merge branch 'oscardssmith-patch-1'
mstamy2 Nov 1, 2016
83ff6fe
Additional error output for failed encryption
moshekaplan Nov 16, 2016
d7b8d3e
Merge pull request #303 from moshekaplan/patch-1
mstamy2 Jan 5, 2017
2f6d2da
Merge pull request #294 from qedsoftware/fix-merger-fileobj
mstamy2 Jan 5, 2017
2a9d76d
Merge pull request #290 from optimojordan/patch-1
mstamy2 Jan 6, 2017
cc2621b
Fix this off-by-one error. ASCII 85 can represent 2^32-1.
Mar 7, 2017
62c1016
Update README to new markdown specs
SubhrajyotiSen Mar 25, 2017
c3231c7
update _rotate function to account for /Rotate being set to an Indire…
kgengler Mar 28, 2017
7844852
Addition of line break for PDF line separators, i've been useing it a…
MiniMarvin May 7, 2017
b9caeed
Merge pull request #336 from SubhrajyotiSen/patch-1
mstamy2 Aug 6, 2017
b3b77b8
Merge pull request #346 from MiniMarvin/master
mstamy2 Dec 27, 2017
a4279cf
Merge pull request #338 from kgengler/master
mstamy2 Dec 27, 2017
fc87287
Improve performance of RC4_encrypt in utils.py
lmwgv Feb 12, 2018
6a578d0
Merge branch 'master' of https://github.com/sylvainpelissier/PyPDF2 i…
mstamy2 Mar 12, 2018
461fc5e
Merge branch 'sylvainpelissier-master'
mstamy2 Mar 12, 2018
772ef3f
Merging from @sylvainpelissier
mstamy2 Mar 12, 2018
94a208e
Merge branch 'master' of https://github.com/mstamy2/PyPDF2
mstamy2 Mar 12, 2018
1775bdc
Merge pull request #393 from lmwgv/master
mstamy2 Apr 1, 2018
22ebc8d
Relax assertions when strict is False
May 15, 2018
18a2627
Merge pull request #427 from massover/strict-pdf-read-error
mstamy2 Jun 25, 2018
6ab2a2d
Fix broken link in setup script
asears Nov 3, 2021
ae37332
DOC: Fix broken URL in setup.py (#644)
MartinThoma Apr 5, 2022
cd435fd
DEV: Add Python 3.8 to tox.ini (#565)
debragail Apr 5, 2022
77c5d26
DOC: Fix removeText docstring (#550)
JeffFessler Apr 5, 2022
ac3d528
DOC: Fix typo: signifigance -> significance (#538)
timgates42 Apr 5, 2022
2443f90
MAINT: Convert print statement to function (#504)
medic17 Apr 5, 2022
27c62e5
DOC: Add pip install instructions (#324)
DavidMetcalfe Apr 5, 2022
2dc1293
DEV: Add LICENSE to MANIFEST.in (#288)
pmlandwehr Apr 5, 2022
f5ab1a3
DEV: Add Github Action for testing (#660)
MartinThoma Apr 6, 2022
b17db79
BUG: Fix formatWarning for filename without slash (#612)
timitos Apr 6, 2022
02cc54b
BUG: Add whitespace between words for extractText() (#569)
inboxsgk Apr 6, 2022
1cde559
TST: Add test for decrypting files (#661)
MartinThoma Apr 6, 2022
dacc6b7
BUG: "invalid escape sequence" SyntaxError (#522)
niklasb Apr 6, 2022
c3e6d4a
BUG: Avoid error when printing warning in pythonw (#486)
colatkinson Apr 6, 2022
abed048
DOC: Make project URLs more prominent
MartinThoma Apr 6, 2022
eea0b72
DOC: Fix Destination.page parameter (#426)
marramgrass Apr 6, 2022
7069216
TST: Basic test for PdfFileMerger (#663)
MartinThoma Apr 6, 2022
f4647b5
MAINT: Use iterator directly instead of using an index (#292)
Imperat Apr 6, 2022
570138b
BUG: Fix Sample_Code/basic_features.py
MartinThoma Apr 6, 2022
7723815
DOC: Update basic_features.py (#394)
possnfiffer Apr 6, 2022
d01cac3
TST: Test annotation extraction
MartinThoma Apr 6, 2022
45421d6
TST: Extract an attachment
MartinThoma Apr 6, 2022
807bb0b
TST: Add test for XMP module
MartinThoma Apr 6, 2022
fb6c5b9
TST: Get outlines
MartinThoma Apr 6, 2022
0f08f83
MAINT: Remove unused imports
MartinThoma Apr 6, 2022
96b4c60
TST: Outlines and various ways to add PDFs
MartinThoma Apr 6, 2022
7528347
Test against Python 3.6, PyPy and PyPy3 (stop testing against Python …
vstoykov Apr 6, 2022
90d5539
ENH: Add alpha channel support for png files (#614)
mohamedali-zorgati1997 Apr 6, 2022
6056a7c
TST: Image extraction
MartinThoma Apr 6, 2022
1e46d84
TST: Install pillow for CI
MartinThoma Apr 6, 2022
3eadff0
BUG: Stream operations can be List or Dict (#665)
MartinThoma Apr 7, 2022
2377c51
DOC: MCVE
MartinThoma Apr 7, 2022
436276c
Use setuptools instead of distutils (#599)
uranusjr Apr 7, 2022
ba57659
MAINT: file → open in 2-up.py (#366)
exiledkingcc Apr 7, 2022
12c7047
ENH: Add options to customize extractText() (#334)
Apr 7, 2022
bab31d8
MAINT: Remove trailing spaces
MartinThoma Apr 7, 2022
27d0263
DEV: Add dev requirements
MartinThoma Apr 7, 2022
3ef8084
DEV: Ignore .egg-info and dist
MartinThoma Apr 7, 2022
0fba59b
DEV: Add Makefile for easy package uploads
MartinThoma Apr 7, 2022
ceb2bb2
REL: 1.27.0
MartinThoma Apr 7, 2022
c25814a
DOC: Use README on PyPI
MartinThoma Apr 7, 2022
d00803c
TST: Test Python 3.6 (#667)
MartinThoma Apr 7, 2022
d2c40db
TST: Test Python 2.7 (#669)
MasterOdin Apr 7, 2022
24c4795
MAINT: mstamy2 → py-pdf
MartinThoma Apr 8, 2022
becb16c
REL: 1.27.1
MartinThoma Apr 8, 2022
ff3c0b1
DOC: Add Sphinx documentation (#666)
MartinThoma Apr 8, 2022
8c2dfe4
DOC: Update documentation URL
MartinThoma Apr 8, 2022
64cf05a
TST: Test PageRange (#674)
MartinThoma Apr 8, 2022
9c33d39
TST: Page class (#675)
MartinThoma Apr 8, 2022
617c44a
TST: PdfFileWriter (#676)
MartinThoma Apr 8, 2022
5c57660
Merge branch 'master' into feature/ASCII85-Off-By-One
MartinThoma Apr 9, 2022
3ddd852
TST: PdfFileWriter.removeImages (#677)
MartinThoma Apr 9, 2022
b9a032a
DOC: PyPDF2 history, comparisons, and formatting fixes (#673)
MartinThoma Apr 9, 2022
6b013a9
BUG/DOC: Add scripts back (#692)
MartinThoma Apr 9, 2022
7a6d298
Minor: Link to discussion in the docs
MartinThoma Apr 9, 2022
eb6c1ed
DOC: Consistent description of PyPDF2
MartinThoma Apr 9, 2022
a385f5d
DOC: Link in Docs to GitHub
MartinThoma Apr 9, 2022
8b659d8
DEV: make clean
MartinThoma Apr 9, 2022
f3828b9
REL: 1.27.2
MartinThoma Apr 9, 2022
237d9cb
ROBUST: Ignore a /Prev entry with the value 0 in the trailer in non-s…
vashek Apr 9, 2022
6a0b89f
DEV: Make tox use pytest and add more Python versions (#721)
vashek Apr 9, 2022
6eafb94
TST: Close file handle in test_writer (#722)
vashek Apr 9, 2022
4fa35c9
DOC: Add user guides (#720)
MartinThoma Apr 9, 2022
05eb9f0
DOC: Fix header duplication (#723)
MartinThoma Apr 9, 2022
fd5051d
DOC: Add pdfrw + pdfminer to comparisons
MartinThoma Apr 9, 2022
3e88206
BUG: Close File Descriptors in Scripts (#575)
JavaScriptDude Apr 9, 2022
67439ed
DOC: Add Scripts/booklet.py (#469)
avm Apr 9, 2022
b76ffcd
中文字符相关的编码错误 Error in Chinese character encoding (#463)
gitzjm Apr 9, 2022
9e00150
ROBUST: Guard 'obj.writeToStream' with 'if obj is not None' + only th…
Apr 9, 2022
c1f07c2
DOC: README.txt ➔ README.md
MartinThoma Apr 9, 2022
845f48c
BUG: Code duplication in 2-up.py
MartinThoma Apr 9, 2022
384146d
STY: 2-up.py code style
MartinThoma Apr 9, 2022
e0abcf9
DOC: Encryption/Decryption, Metadata (#724)
MartinThoma Apr 10, 2022
8be0768
DOC: Add more merging details (#725)
MartinThoma Apr 10, 2022
410595f
DOC: Simplify usage example on README
MartinThoma Apr 10, 2022
a96bc3c
PKG: Make Tests not a subpackage (#728)
MartinThoma Apr 10, 2022
8f8e0ae
BUG: Fix ASCII85Decode.decode assertion (#729)
MartinThoma Apr 10, 2022
4bd8277
Merge branch 'master' into feature/ASCII85-Off-By-One
MartinThoma Apr 10, 2022
d123c63
MAINT: Remove Sample_Code (#726)
MartinThoma Apr 10, 2022
984841c
TST: Fix test_get_images (#730)
MartinThoma Apr 10, 2022
93a6063
STY: Apply black
MartinThoma Apr 10, 2022
62a7c96
REL: 1.27.3
MartinThoma Apr 10, 2022
17f2a38
DOC: Miscallenious ➔ Miscellaneous (Typo)
MartinThoma Apr 11, 2022
f881d89
PKG: Add more precise license field to setup (#733)
MasterOdin Apr 11, 2022
966eb5d
TST: Add test for issue #297
MartinThoma Apr 11, 2022
1f63d41
BUG: Guard formatting of __init__.__doc__ string (#738)
MartinThoma Apr 12, 2022
8b40f6b
TST: Fix CI triggering (master ➔ main) (#739)
MartinThoma Apr 12, 2022
1f00794
STY: Fix various style issues (#742)
MartinThoma Apr 12, 2022
e45e66b
REL: 1.27.4
MartinThoma Apr 12, 2022
38d5ec4
STY: Fix style issues (#743)
MartinThoma Apr 13, 2022
7771fad
DEV: Remove unused Travis-CI configuration (#747)
MasterOdin Apr 14, 2022
0ea2301
TST: Rewrite JS tests from unittest to pytest (#746)
MasterOdin Apr 14, 2022
0500c8d
DOC: Adjust short description
MartinThoma Apr 14, 2022
01a1242
DEV: Show code coverage (#754)
MartinThoma Apr 15, 2022
fe45d2e
Combine coverage (#755)
MartinThoma Apr 15, 2022
9d53ee8
BUG: Fix merging encrypted files (#757)
MartinThoma Apr 15, 2022
012709f
TST: Increase Test coverage (#756)
MartinThoma Apr 15, 2022
29194cd
ROBUST: title sometimes None (#744)
clach04 Apr 15, 2022
0890b06
TST: Add test for inline images (#758)
MartinThoma Apr 15, 2022
d71fb3e
SEC/PERF: ContentStream_readInlineImage (#740)
sekrause Apr 15, 2022
eda50ac
TST: Check for metadata
MartinThoma Apr 15, 2022
8aa440c
DEV: Add mutmut (#760)
MartinThoma Apr 15, 2022
733989a
REL: 1.27.5
MartinThoma Apr 15, 2022
bd7500d
BUG: IndexError for getPage() of decryped file (#359)
denis-osipov Apr 16, 2022
d58a849
TST: Regression test for #327
MartinThoma Apr 16, 2022
a5875c5
STY: Make variable naming more consistent in tests
MartinThoma Apr 16, 2022
cf20f92
ROB: Allow extra whitespace before "obj" in readObjectHeader (#567)
malthejorgensen Apr 16, 2022
87aafd6
DOC: Working with annotations (#764)
MartinThoma Apr 16, 2022
d5a5eea
MAINT: Use grouped constants instead of string literals (#745)
MartinThoma Apr 16, 2022
c138f21
BUG: Clip by trimBox when merging pages, which would otherwise be ign…
forrestv Apr 16, 2022
bf3c9c9
BUG: Add overwriteWarnings parameter PdfFileMerger (#243)
andrecp Apr 16, 2022
4a3af96
DOCS: Structure history
MartinThoma Apr 16, 2022
5e4fdfa
DEV: Add issue templates (#765)
MartinThoma Apr 16, 2022
ba7ee5b
BUG: Handle cases where decodeParms is an ArrayObject (#405)
jc275 Apr 16, 2022
03ea3ec
BUG: Fix reading more than last1K for EOF (#642)
rltpoa Apr 16, 2022
89bc093
DOC: Link to pdftoc in Sample_Code (#628)
vb64 Apr 16, 2022
a6ddce0
Merge branch 'main' into feature/ASCII85-Off-By-One
MartinThoma Apr 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[run]
source = PyPDF2
branch = True

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
@overload

# Don't complain about missing debug-only code:
def __repr__
def __str__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Report a bug
about: Something broke!
title: ""
labels: Bug
assignees: MartinThoma

---

Replace this: What happened? What were you trying to achieve?

## Environment

Which environment were you using when you encountered the problem?

```python
$ python -m platform
# TODO: Your output goes here

$ python -c "import PyPDF2;print(PyPDF2.__version__)"
# TODO: Your output goes here
```

## Code

This is a minimal, complete example that shows the issue:

```python
# TODO: Your code goes here
```

## PDF

Share here the PDF file(s) that cause the issue. The smaller they are, the
better. Let us know if we may add them to our tests!
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Request a Feature
about: What do you think is missing in PyPDF2?
title: ""
labels: Feature Request
assignees: MartinThoma
---

## Explanation

Explain briefly what you want to achive.

## Code Example

How would your feature be used? (Remove this if it is not applicable.)

```python
from PyPDF2 import PdfFileReader, PdfFileWriter
... # your new feature in action!
```
98 changes: 98 additions & 0 deletions .github/workflows/github-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:
name: pytest on ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install requirements (Python 3)
if: matrix.python-version != '2.7'
run: |
pip install -r requirements/ci.txt
- name: Install requirements (Python 2)
if: matrix.python-version == '2.7'
run: |
pip install pillow pytest coverage
- name: Install PyPDF2
run: |
pip install .
- name: Test with flake8
run: |
flake8 . --ignore=E203,W503,W504,E,F403,F405 --exclude build
if: matrix.python-version != '2.7'
- name: Test with pytest
run: |
python -m coverage run --parallel-mode -m pytest Tests -vv
- name: Upload coverage data
uses: actions/upload-artifact@v3
with:
name: coverage-data
path: .coverage.*
if-no-files-found: ignore

package:
name: Build & verify package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{env.PYTHON_LATEST}}

- run: python -m pip install build twine check-wheel-contents
- run: python -m build --sdist --wheel .
- run: ls -l dist
- run: check-wheel-contents dist/*.whl
- name: Check long_description
run: python -m twine check dist/*

coverage:
name: Combine & check coverage.
runs-on: ubuntu-latest
needs: tests

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
# Use latest Python, so it understands all syntax.
python-version: ${{env.PYTHON_LATEST}}

- run: python -m pip install --upgrade coverage[toml]

- uses: actions/download-artifact@v3
with:
name: coverage-data

- name: Combine coverage & create xml report
run: |
python -m coverage combine
python -m coverage xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
*.pyc
*.swp
.DS_Store
.tox
build
.idea/*
*.egg-info/
dist/*

#
.mutmut-cache
mutmut-results.*

# Code coverage artifacts
.coverage*
coverage.xml

# Editors / IDEs
.vscode/

# Docs
docs/_build/

# Files generated by some of the scripts
dont_commit_merged.pdf
dont_commit_writer.pdf
PyPDF2-output.pdf
Image9.png
PyPDF2_pdfLocation.txt
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# pre-commit run --all-files
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-added-large-files
args: ['--maxkb=1000']
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
args: ["--ignore", "E,W,F"]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.942
# hooks:
# - id: mypy
# - repo: https://github.com/psf/black
# rev: 22.3.0
# hooks:
# - id: black
# - repo: https://github.com/asottile/pyupgrade
# rev: v2.31.1
# hooks:
# - id: pyupgrade
# args: [--py36-plus]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==22.1.0]
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.6.15
Loading