PyPDF2 throws TypeError

I am trying to create watermark on a pdf file. Am using py3.4 and PyPDF2. while executing the merge statement i am getting error as shown below. Any help would be greatly appreciated.

Traceback (most recent call last):
File "C:\Documents and Settings\Administrator.COMPUTER-D2BC9B\Desktop\watermark.py", line 49, in
page1.mergePage(page3)
File "c:\python34\lib\site-packages\PyPDF2\pdf.py", line 1803, in mergePage
self.mergePage(page2)
File "c:\python34\lib\site-packages\PyPDF2\pdf.py", line 1853, in _mergePage
originalContent, self.pdf))
File "c:\python34\lib\site-packages\PyPDF2\pdf.py", line 1766, in _pushPopGS
stream = ContentStream(contents, pdf)
File "c:\python34\lib\site-packages\PyPDF2\pdf.py", line 2210, in init
stream = BytesIO(b
(stream.getData()))
File "c:\python34\lib\site-packages\PyPDF2\generic.py", line 829, in getData
decoded._data = filters.decodeStreamData(self)
File "c:\python34\lib\site-packages\PyPDF2\filters.py", line 316, in decodeStreamData
data = ASCII85Decode.decode(data)
File "c:\python34\lib\site-packages\PyPDF2\filters.py", line 256, in decode
data = [y for y in data if not (y in ' \n\r\t')]
File "c:\python34\lib\site-packages\PyPDF2\filters.py", line 256, in
data = [y for y in data if not (y in ' \n\r\t')]
TypeError: 'in ' requires string as left operand, not int

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories