Skip to content

Commit 6f1c528

Browse files
committed
Read extra initial whitespace when reading object from stream resolves py-pdf#204
1 parent 33d7f71 commit 6f1c528

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

PyPDF2/pdf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,8 @@ def _getObjectFromStream(self, indirectReference):
14691469
assert idx < objStm['/N']
14701470
streamData = BytesIO(b_(objStm.getData()))
14711471
for i in range(objStm['/N']):
1472+
readNonWhitespace(streamData)
1473+
streamData.seek(-1, 1)
14721474
objnum = NumberObject.readFromStream(streamData)
14731475
readNonWhitespace(streamData)
14741476
streamData.seek(-1, 1)

0 commit comments

Comments
 (0)