You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
import pdfrw
pdf = pdfrw.PdfReader(input_pdf)
Error message
~\Anaconda3\lib\site-packages\pdfrw\pdfreader.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:
~\Anaconda3\lib\site-packages\pdfrw\pdfreader.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Ð\x8a\x13õ#v\x9f0uÀ\x08C5n¡³ñų\x9d\x93\x91\x06Åo\x11j\x8eO8êøÏ\x96\x1fá?\x10ãoÂõõÀù,,1!6HêíG\x1eb\x18½'éïz²å½#¸,\x9e"```
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?
import pdfrw
pdf = pdfrw.PdfReader(input_pdf)
Error message
~\Anaconda3\lib\site-packages\pdfrw\pdfreader.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:
~\Anaconda3\lib\site-packages\pdfrw\pdfreader.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Ð\x8a\x13õ#v\x9f0uÀ\x08C5n¡³ñų\x9d\x93\x91\x06Åo\x11j\x8eO8êøÏ\x96\x1fá?\x10ãoÂõõÀù,,1!6HêíG\x1eb\x18½'éïz²å½#¸,\x9e"```
Sample pdf
https://www.uobgroup.com/hk/assets/pdfs/Billof-Exchange.pdf
The text was updated successfully, but these errors were encountered: