I am trying to update a fillable PFD form with python, when trying to read it it throws an exception. Below are the code, sample pdf and the error thrown. Is there any one seen this before?
<code>import pdfrw
pdf = pdfrw.PdfReader(input_pdf)
</code>
<code>import pdfrw
pdf = pdfrw.PdfReader(input_pdf)
</code>
import pdfrw
pdf = pdfrw.PdfReader(input_pdf)
Error message
<code>~Anaconda3libsite-packagespdfrwpdfreader.py in __init__(self, fname, fdata, decompress, decrypt, password, disable_gc, verbose)
648
649 if is_stream:
--> 650 self.load_stream_objects(trailer.object_streams)
651
652 while xref_list:
~Anaconda3libsite-packagespdfrwpdfreader.py in load_stream_objects(self, object_streams)
306 firstoffset = int(obj.First)
307 while objsource.floc < firstoffset:
--> 308 offsets.append((int(next()), firstoffset + int(next())))
309 for num, offset in offsets:
310 # Read the object, and call special code if it starts
ValueError: invalid literal for int() with base 10: "ÔÞíWÎ0vætºUÐx8ax13õ#vx9f0uÀx08C5n¡³ñųx9dx93x91x06Åox11jx8eO8êøÏx96x1fá?x10ãoÂõõÀù,,1!6HêíGx1ebx18½'éïz²å½#¸,x9e"```
Sample pdf
https://www.uobgroup.com/hk/assets/pdfs/Billof-Exchange.pdf
</code>
<code>~Anaconda3libsite-packagespdfrwpdfreader.py in __init__(self, fname, fdata, decompress, decrypt, password, disable_gc, verbose)
648
649 if is_stream:
--> 650 self.load_stream_objects(trailer.object_streams)
651
652 while xref_list:
~Anaconda3libsite-packagespdfrwpdfreader.py in load_stream_objects(self, object_streams)
306 firstoffset = int(obj.First)
307 while objsource.floc < firstoffset:
--> 308 offsets.append((int(next()), firstoffset + int(next())))
309 for num, offset in offsets:
310 # Read the object, and call special code if it starts
ValueError: invalid literal for int() with base 10: "ÔÞíWÎ0vætºUÐx8ax13õ#vx9f0uÀx08C5n¡³ñųx9dx93x91x06Åox11jx8eO8êøÏx96x1fá?x10ãoÂõõÀù,,1!6HêíGx1ebx18½'éïz²å½#¸,x9e"```
Sample pdf
https://www.uobgroup.com/hk/assets/pdfs/Billof-Exchange.pdf
</code>
~Anaconda3libsite-packagespdfrwpdfreader.py in __init__(self, fname, fdata, decompress, decrypt, password, disable_gc, verbose)
648
649 if is_stream:
--> 650 self.load_stream_objects(trailer.object_streams)
651
652 while xref_list:
~Anaconda3libsite-packagespdfrwpdfreader.py in load_stream_objects(self, object_streams)
306 firstoffset = int(obj.First)
307 while objsource.floc < firstoffset:
--> 308 offsets.append((int(next()), firstoffset + int(next())))
309 for num, offset in offsets:
310 # Read the object, and call special code if it starts
ValueError: invalid literal for int() with base 10: "ÔÞíWÎ0vætºUÐx8ax13õ#vx9f0uÀx08C5n¡³ñųx9dx93x91x06Åox11jx8eO8êøÏx96x1fá?x10ãoÂõõÀù,,1!6HêíGx1ebx18½'éïz²å½#¸,x9e"```
Sample pdf
https://www.uobgroup.com/hk/assets/pdfs/Billof-Exchange.pdf