Skip to content

Commit

Permalink
ROB : add required line separators in content stream arrays
Browse files Browse the repository at this point in the history
fix #1278
  • Loading branch information
pubpub-zz committed Aug 26, 2022
1 parent 2ddc48a commit 72f8f2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PyPDF2/generic/_data_structures.py
Expand Up @@ -679,6 +679,8 @@ def __init__(
data = b""
for s in stream:
data += b_(s.get_object().get_data())
if data[-1] != b"\n":
data += b"\n"
stream_bytes = BytesIO(data)
else:
stream_data = stream.get_data()
Expand Down
5 changes: 5 additions & 0 deletions tests/test_page.py
Expand Up @@ -265,6 +265,11 @@ def test_iss_1142():
"https://github.com/py-pdf/PyPDF2/files/9150656/ST.2019.PDF",
"iss_1134.pdf",
),
# iss 1:
(
"https://github.com/py-pdf/PyPDF2/files/9432350/Work.Flow.From.Check.to.QA.pdf",
"WFCA.pdf",
),
],
)
def test_extract_text_page_pdf(url, name):
Expand Down

0 comments on commit 72f8f2d

Please sign in to comment.