Skip to content

Commit

Permalink
Don't decimalize (non_)stroking_color, fixing jsvine#53
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Mar 6, 2018
1 parent 04a2daf commit b0f094c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pdfplumber/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def point2coord(pt):

NON_DECIMALIZE = [
"fontname", "name", "upright",
"stroking_color", "non_stroking_color",
]

def process_object(obj):
Expand Down
Binary file added tests/pdfs/issue-53-example.pdf
Binary file not shown.
6 changes: 6 additions & 0 deletions tests/test-issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ def test_issue_33(self):
)
assert len(pdf.metadata.keys())

def test_issue_53(self):
pdf = pdfplumber.from_path(
os.path.join(HERE, "pdfs/issue-53-example.pdf")
)
assert len(pdf.objects)

0 comments on commit b0f094c

Please sign in to comment.