Commit Graph

516 Commits

Author SHA1 Message Date
Jeremy Singer-Vine e3142a0b57 Fix lru_cache usage re. class methods
Cf. https://rednafi.github.io/reflections/dont-wrap-instance-methods-with-functoolslru_cache-decorator-in-python.html
2022-11-21 21:58:08 -05:00
Jeremy Singer-Vine 60aec51be0 Add simple make build to Makefile 2022-10-01 09:45:06 -04:00
Jeremy Singer-Vine 30dac25738 Upgrade dev req nbexec 0.1.0->0.2.0 2022-10-01 09:44:26 -04:00
Jeremy Singer-Vine 5aca57c313 Rerun examples with v0.7.5 v0.7.5 2022-10-01 09:42:45 -04:00
Jeremy Singer-Vine 301f256cd3 Bump to version 0.7.5 2022-10-01 09:41:26 -04:00
Jeremy Singer-Vine 7c57489478 Update CHANGELOG.md 2022-10-01 09:40:36 -04:00
Jeremy Singer-Vine 1e976568d9 Reallow non-callable key_fn in .cluster_objects()
Resolves https://github.com/jsvine/pdfplumber/issues/691

Thanks to @jfuruness for flagging.
2022-10-01 09:35:42 -04:00
Jeremy Singer-Vine 6d71c2e25b Merge branch 'stable' into develop 2022-09-19 14:47:43 -04:00
Jeremy Singer-Vine ed2eb49f03 Update comparison to PyPDF2 (h/t @tjex)
As of April 2022, the project has been "reborn":
https://pypdf2.readthedocs.io/en/latest/meta/history.html
2022-09-19 14:45:53 -04:00
Jeremy Singer-Vine cab5c5fe22 Make im.show() usage a bit clearer. 2022-09-06 19:20:45 -04:00
Jeremy Singer-Vine 5c7787b771 Add PageImage.show() (#715)
A simple method, just an alias to PageImage.annotated.show(), which uses
https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.show

Inspired by @osephernest's question in
https://github.com/jsvine/pdfplumber/discussions/715
2022-08-22 17:49:31 -04:00
Jeremy Singer-Vine 3457d79d0e Update Wand dependency to >=0.6.10 (#713)
Cf. https://github.com/jsvine/pdfplumber/issues/713
2022-08-21 18:06:57 -04:00
Jeremy Singer-Vine 4919059639 Update CHANGELOG.md 2022-08-05 17:12:30 -04:00
Jhonatan Lopes 690848732e Update setup.py to ensure that py.typed appears in wheel (#703)
Many thanks to @jhonatan-lopes for discovering, explaining, and fixing the issue.
2022-08-05 17:08:33 -04:00
Jeremy Singer-Vine 446abb7dd1 Add consulting note to README.md 2022-07-22 15:29:04 -04:00
Jeremy Singer-Vine 11f8ce3e46 Bump to version 0.7.4 v0.7.4 2022-07-20 18:32:46 -04:00
Jeremy Singer-Vine 296d55c2fd Update CHANGELOG.md 2022-07-20 18:32:00 -04:00
Jeremy Singer-Vine 3ab1cc4377 Add utils/Page.outside_bbox(...)
See https://github.com/jsvine/pdfplumber/issues/369
2022-07-20 17:10:35 -04:00
Jeremy Singer-Vine c5480a9362 Make explicit to Wand that source file is a PDF 2022-07-20 15:59:18 -04:00
Jeremy Singer-Vine b6ff9e8761 Add note to PIL.Image.DecompressionBombError msgs
See https://github.com/jsvine/pdfplumber/issues/413
2022-07-20 15:18:25 -04:00
Jeremy Singer-Vine 71ad60f891 Add strict=True/False to .crop/within_bbox(...)
See https://github.com/jsvine/pdfplumber/issues/421
2022-07-20 15:16:03 -04:00
Jeremy Singer-Vine 28330da9c3 Fix handling of CMYK pages in PageImage conversion 2022-07-20 12:16:36 -04:00
Jeremy Singer-Vine c20c23afec Note _itemgetter removal in CHANGELOG.md (v0.7.0)
Cf.: https://github.com/jsvine/pdfplumber/issues/691
2022-07-20 08:58:28 -04:00
Jeremy Singer-Vine f9c1f6172b Rerun examples using latest version v0.7.3 2022-07-18 10:48:11 -04:00
Jeremy Singer-Vine 3d80cebb17 Bump to version 0.7.3 2022-07-18 10:47:36 -04:00
Jeremy Singer-Vine b98dd7caff Quick fix for image transparency issue 2022-07-18 10:35:35 -04:00
Jeremy Singer-Vine 1a07638ff1 Update test for alt. PNG repr size 2022-07-17 22:58:54 -04:00
Jeremy Singer-Vine 64afaf9559 Rerun examples using latest version 2022-07-17 22:52:29 -04:00
Jeremy Singer-Vine 12daa3b1a8 Bump to version 0.7.2 v0.7.2 2022-07-17 22:48:05 -04:00
Jeremy Singer-Vine 589e0d536d Update .gitignore 2022-07-17 22:47:12 -04:00
Jeremy Singer-Vine 21b9519b0e Update CHANGELOG.md 2022-07-17 22:47:00 -04:00
Jeremy Singer-Vine 1cd1f9aea9 Change .to_image(...)'s approach ...
... preferring to composite with a white background instead of removing
the alpha channel. This seems to more reliably produce high-quality
conversions (easier to read, fewer conversion artifacts) than either the
prior or other previous approaches.
2022-07-17 22:45:59 -04:00
Jeremy Singer-Vine 35fd4298bc Add test_extract_text_punctuation 2022-07-17 12:51:07 -04:00
Jeremy Singer-Vine 8687c8737f Update CHANGELOG.md 2022-07-16 17:22:12 -04:00
Jeremy Singer-Vine b00cbbe3aa Thank @lolipopshock in README.md 2022-07-16 17:22:06 -04:00
Jeremy Singer-Vine fd815e1c49 Add split_at_punctuation also to .extract_text(...) 2022-07-16 17:21:47 -04:00
Jeremy Singer-Vine 58e025c5f4 Refactor .iter_chars_to_words(...) slightly
No changes to behavior or interface.
2022-07-16 17:14:46 -04:00
Shannon Shen 5193c26c31 Consider punctuation when extracting words (#682)
Adds an optional argument to the `extract_words` function that allows to enforce breaking tokens at punctuation. PR by @lolipopshock.
2022-07-16 09:58:10 -04:00
Jeremy Singer-Vine e264585e52 Update codecov/codecov-action version 2022-07-15 07:57:48 -04:00
Jeremy Singer-Vine 6d4eec829a Add link to Chinese translation 2022-07-14 17:45:01 -04:00
Jeremy Singer-Vine cfa0a38e30 Update list of tested Python versions 2022-07-14 17:37:00 -04:00
Jeremy Singer-Vine 12feadb8fd Fix bug in LayoutEngine.calculate(...)
The problem had been that `LayoutEngine.calculate(...)` was assuming
that len(char["text"]) would always equal 1, which is not true for
ligatures.

Thanks to @samkit-jain for finding a PDF that raised the error, and to
@bpugnaire for raising issue #683.
2022-07-14 17:21:55 -04:00
Jeremy Singer-Vine fd3f5334f8 Bump version to 0.7.1 v0.7.1 2022-05-31 15:53:26 -04:00
Jeremy Singer-Vine 0475819d73 Update CHANGELOG.md 2022-05-31 15:52:50 -04:00
Jeremy Singer-Vine ef065a72e5 Add Makefile target and reqs for examples 2022-05-31 15:50:50 -04:00
Jeremy Singer-Vine 063e2edd75 Fix #659 (PageImage.debug_tablefinder())
Thanks to @rneumann7 for flagging!
2022-05-31 15:45:40 -04:00
Jeremy Singer-Vine a0988aa963 Add missing h/t to CHANGELOG.md 2022-05-27 15:02:19 -04:00
Jeremy Singer-Vine cec6e0feb0 Bump version to 0.7.0 v0.7.0 2022-05-27 14:54:28 -04:00
Jeremy Singer-Vine 23d449badc Update CHANGELOG.md 2022-05-27 14:53:43 -04:00
Jeremy Singer-Vine ad3df11954 Fix .extract_text(layout=True) for text-less pages
Fixes https://github.com/jsvine/pdfplumber/issues/658

Thanks to @ethanscorey for flagging!
2022-05-27 14:41:57 -04:00