Commit Graph

235 Commits

Author SHA1 Message Date
Jeremy Singer-Vine 4c69c58f1a Add basic Makefile for venv and tests 2020-07-25 08:46:03 -04:00
Jeremy Singer-Vine 1ac16dd369 Change testing framework from nosetests to pytest 2020-07-25 08:45:17 -04:00
Jeremy Singer-Vine 51a3e777c9 Fix and simplify requirements.txt 2020-07-25 08:45:01 -04:00
Jeremy Singer-Vine e99a664701 Fix .extract_text/words default tolerance @ README 2020-07-19 10:45:18 -04:00
Jeremy Singer-Vine fa6110fb32 Add long_description to setup.py via README.md 2020-07-19 10:36:28 -04:00
Jeremy Singer-Vine 48eaa51557 Move from Pipfile back to standard pip req files 2020-07-19 10:35:09 -04:00
Jeremy Singer-Vine 9eb5c4b825 Bump to v0.5.22 v0.5.22 2020-07-18 12:52:51 -04:00
Jeremy Singer-Vine cddbff74e5 Upgrade pdfminer.six==20200517 and adjust tests
New pdfminer.six version includes some improvements to layout analysis,
and especially char sizes. Tests tweaked accordingly.
2020-07-18 12:50:12 -04:00
Jeremy Singer-Vine 0254da3a47 Merge branch 'idan-david/master' 2020-07-18 11:19:34 -04:00
Jeremy Singer-Vine 0731d6059d Explicitly mention .image and .figuer objects
See https://github.com/jsvine/pdfplumber/issues/219
2020-06-24 22:47:45 -04:00
Idan David 334a49b74c Add test for LTChar colors 2020-05-31 12:14:25 +03:00
Jeremy Singer-Vine 7c84090f59 Bump to v0.5.21 v0.5.21 2020-05-27 22:25:12 -04:00
Jeremy Singer-Vine d64afa8c2a Fix Page.extract_table(...) when no table found
Return None instead of crashing.

Fixes https://github.com/jsvine/pdfplumber/issues/216
2020-05-27 22:24:23 -04:00
Idan David e1fb313082 Add stroking and non-stroking colors for objects
Fixes #148
2020-05-20 16:30:00 +03:00
Jeremy Singer-Vine 81104301cb Bump to v0.5.20 v0.5.20 2020-04-29 09:31:07 -04:00
Jeremy Singer-Vine d3923aede6 Move one line of code to where it makes more sense 2020-04-29 09:24:53 -04:00
Jeremy Singer-Vine acf171e2a8 Remove support for Python 2 (via six) and <3.3
(In Python 3.3+, `import decimal` automatically imports the C version.)
2020-04-29 08:53:54 -04:00
Jeremy Singer-Vine 8d43bb017e Consistify internal/relative import naming 2020-04-29 08:35:20 -04:00
Jeremy Singer-Vine 85f422d001 Fix bug in pdfminer.six's .resolve_all
See https://github.com/jsvine/pdfplumber/issues/203

Root cause of decimalization bug flagged in that issue was
pdfminer.six's .resolve_all method not recusively resolving items within
tuples. Now we define our own method, with some slight optimization
tweaks.
2020-04-29 08:31:39 -04:00
Jeremy Singer-Vine ab957deda7 Fix .get_page_image to prefer paths over streams
See discussion in https://github.com/jsvine/pdfplumber/issues/124
for details. h/t @ubmarco
2020-04-28 11:48:45 -04:00
Jeremy Singer-Vine 9c4329d116 Bump to v0.5.19 v0.5.19 2020-04-16 14:37:41 -04:00
Jeremy Singer-Vine 830d11700a Improve utils.decimalize performace [h/t ubmarco]
See: https://github.com/jsvine/pdfplumber/issues/197
2020-04-16 14:34:10 -04:00
Jeremy Singer-Vine 2a0c4a2cb8 Fix un-referenced utils.objects_overlap
... and improve naming of variables in "text" table strategy
2020-04-08 20:59:21 -04:00
Jeremy Singer-Vine 14ac716d96 Merge pull request #200 from samkit-jain/patch-1
Add missing object type `rect_edge` to `obj_to_edges()`
2020-04-07 20:50:29 -04:00
Samkit Jain 0edc6bfadc add missing object type rect_edge to obj_to_edges() 2020-04-07 20:10:18 +05:30
Jeremy Singer-Vine dead89c86d Bump to v0.5.18 v0.5.18 2020-04-01 23:36:21 -04:00
Jeremy Singer-Vine d68e8813be Consist. handle edge-ish objects for table-finding
Allow lines/rects/curves to be passed as "explicit_..._lines" params.

Fixes https://github.com/jsvine/pdfplumber/issues/127
2020-04-01 23:34:36 -04:00
Jeremy Singer-Vine 150b5a98b8 Fix incomplete logic in extract_words
Handling of ltr/rtl/ttb/btt was applied inconsistently.
2020-04-01 19:42:57 -04:00
Jeremy Singer-Vine 8f12776f99 Update CHANGELOG.md for v0.5.17 v0.5.17 2020-04-01 09:28:59 -04:00
Jeremy Singer-Vine 0712711a36 Bump to version 0.5.17 2020-04-01 09:17:24 -04:00
Jeremy Singer-Vine 8a5d858b60 Improve/fix extract_text bug, esp. re. vert. text
Previously, utils.extract_text(...) returned incorrect results in
certain cases when vertical text was present, as observed in
https://github.com/jsvine/pdfplumber/pull/192. This commit fixes that
by first segregating vertical and horizontal text (via "upright" char
attribute) before clustering characters.

It also adds two parameters, horizontal_ltr and vertical_ttb, to give
users control over whethere words are meant to be read left-to-right
and/or top-to-bottom vs. their opposites.
2020-04-01 09:13:18 -04:00
Jeremy Singer-Vine b498df230f Fix issue #176, re. extract_table ignoring kwargs 2020-04-01 09:07:30 -04:00
Jeremy Singer-Vine bc9548673f Merge branch 'master' into develop 2020-03-29 20:46:38 -04:00
Jeremy Singer-Vine 56f96d8693 Add @cheungpat to acknowledgments
See https://github.com/jsvine/pdfplumber/pull/179
2020-03-29 20:46:11 -04:00
Jeremy Singer-Vine bfeb454e14 Merge pull request #179 from cheungpat/read-bytes-stream
Fix #124 opening PDF with bytes stream
2020-03-29 20:44:18 -04:00
Jeremy Singer-Vine 25672961b2 Fix and simplify obj-in-bbox logic
Previously, this logic contained a bug, in which objects that overlapped
with a bbox but did not have a vertex inside it (imagine, for example,
two rectangles arranged as a Greek cross) were not considered to be
overalapping. Additionally, the code was more complicated than it needed
to be.
2020-03-29 20:12:22 -04:00
Jeremy Singer-Vine b9bea0735c Merge pull request #191 from jwilk-forks/spelling
Fix typos
2020-03-29 20:05:53 -04:00
Jakub Wilk d26ecb3cc9 Fix typos 2020-03-09 22:22:45 +01:00
Kwok-kuen Cheung 8d6e52a43c Fix #124 opening PDF with bytes stream 2020-02-05 22:36:19 +08:00
Jeremy Singer-Vine 76bd81815b Bump to v0.5.16 and update CHANGELOG v0.5.16 2020-01-12 23:09:07 -05:00
Jeremy Singer-Vine df00787ada Prevent custom LAParams from raising exception
Issue #168 / PR #169. Many thanks to @frascuchon for submitting the PR,
which is the source for the code/idea in this commit.
2020-01-12 23:08:58 -05:00
Jeremy Singer-Vine 43f496cd29 Explicitly add six as dependency
h/t @GjjvdBurg: https://github.com/jsvine/pdfplumber/issues/167
2020-01-12 22:36:11 -05:00
Jeremy Singer-Vine 6c2e474490 Update pdfminer.six/pillow reqs & bump to v0.5.15 2020-01-05 21:33:49 -05:00
Jeremy Singer-Vine 8c8e424c65 Fix README typo (h/t @choiasher) + nix v0.6.0 note 2019-12-06 09:02:17 -05:00
Jeremy Singer-Vine 0d3c83ea77 Move visual-debug dependencies & note ghostscript
Addresses https://github.com/jsvine/pdfplumber/issues/144
2019-10-14 22:40:54 -04:00
Jeremy Singer-Vine e8159355ba Bump to version 0.5.14 v0.5.14 2019-10-06 18:07:52 -04:00
Jeremy Singer-Vine b83afee9fb Add test for PR 138 and thank @samkit-jain 2019-10-06 17:59:39 -04:00
Jeremy Singer-Vine b4e113a127 Merge branch 'master' into pr-138 2019-10-06 17:56:22 -04:00
Jeremy Singer-Vine 56a3ac7f2f Fix .extract_table() sorting bug (#140) 2019-10-06 17:41:31 -04:00
Samkit Jain ffe681a5dc make default password string object and not bytes object 2019-08-30 19:38:59 +05:30