Closed Abdur-rahmaanJ closed 3 years ago
Hi @Abdur-rahmaanJ Appreciate your interest in the library. Would it be possible for you to share a PDF to demonstrate this issue? Will help us in reproducing and fixing the issue. Please remove any sensitive information from the PDF before sharing it here.
Try it on any research gate pdf. If you dont get the error on windows, i'll send you the exact pdf
I chose this PDF and it ran fine for me. I got
{'fontname': 'SourceSansPro-Regular', 'adv': Decimal('4.803'), 'upright': True, 'x0': Decimal('39.870'), 'y0': Decimal('711.959'), 'x1': Decimal('43.061'), 'y1': Decimal('717.939'), 'width': Decimal('3.192'), 'height': Decimal('5.980'), 'size': Decimal('5.980'), 'object_type': 'char', 'page_number': 1, 'stroking_color': (0, 0, 0), 'non_stroking_color': (0, 0, 0), 'text': 'S', 'top': Decimal('74.061'), 'bottom': Decimal('80.041'), 'doctop': Decimal('74.061')}
as the output
The thing to note is that I am using Ubuntu and not Windows. If for the PDF I used, you are seeing the same error, then, it might be OS specific. If not, then it might be PDF specific and would request you to share the PDF you used.
Try checking this one
Thank you for sharing the PDF @Abdur-rahmaanJ The issue is coming because the PDF has a metadata field by the name Changes
which is a list of PDFObjRef
objects. I am not sure if that is allowed by the PDF specifications (linking https://github.com/jsvine/pdfplumber/issues/297#issuecomment-718862330) but nonetheless, it is something that can be handled in the code. I shall raise a PR for it soon.
XD since this was the first PDF checked, i assumed pdfplumber was broken!
Describe the bug
Got
Code to reproduce the problem
Environment