Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add resolve_all to page rotation attr #136

Merged
merged 1 commit into from
Aug 29, 2019
Merged

Conversation

austinzy
Copy link
Contributor

rotation.pdf

p = Page(self, page, page_number=page_number, initial_doctop=doctop)
  File "venv/lib/python3.7/site-packages/pdfplumber/page.py", line 22, in __init__
    _rotation = self.decimalize(self.page_obj.attrs.get("Rotate", 0))
  File "venv/lib/python3.7/site-packages/pdfplumber/page.py", line 50, in decimalize
    return utils.decimalize(x, self.pdf.precision)
  File "venv/lib/python3.7/site-packages/pdfplumber/utils.py", line 117, in decimalize
    return _decimalize(v, q)
  File "venv/lib/python3.7/site-packages/pdfplumber/utils.py", line 110, in _decimalize
    raise ValueError("Cannot convert {0} to Decimal.".format(v))
ValueError: Cannot convert <PDFObjRef:8> to Decimal.

@jsvine
Copy link
Owner

jsvine commented Aug 29, 2019

Thank you, @austinzy. Looks like a good catch. I'll aim to take a closer look soon, with the goal of merging.

@jsvine jsvine merged commit db6df96 into jsvine:master Aug 29, 2019
@jsvine
Copy link
Owner

jsvine commented Aug 29, 2019

Merged and now available in v0.5.13. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants