Pdfrw and Fillpdf error while reading XFA pdf in python

76 views Asked by At

I am trying open this file in python https://www.canada.ca/content/dam/ircc/migration/ircc/english/pdf/kits/forms/imm5709e.pdf

import pdfrw
pdfrw.PdfFileReader('form.pdf')

but getting this error (same error with fillpdf)

    304                 firstoffset = int(obj.First)
    305                 while objsource.floc < firstoffset:
--> 306                     offsets.append((int(next()), firstoffset + int(next())))
    307                 for num, offset in offsets:
    308                     # Read the object, and call special code if it starts

ValueError: invalid literal for int() with base 10: '#h\x8d?¼\x04´\x81'

Screenshot of file properties File Properties

0

There are 0 answers