Commit Graph

114 Commits

Author SHA1 Message Date
Jeremy Singer-Vine 1a8603bd1b Bump version to v0.9.0 2023-04-13 08:40:52 -04:00
Jeremy Singer-Vine 1d5d646c04 Bump version to v0.8.1 2023-04-08 10:47:49 -04:00
Jeremy Singer-Vine b6847ad4cd Bump to v0.8.0 2023-02-13 22:00:45 -05:00
Jeremy Singer-Vine 24cab4d3fe Update CHANGELOG.md 2023-02-13 21:52:42 -05:00
Jeremy Singer-Vine 3424b57612 Refactor text-extraction utilities 2023-02-07 17:06:59 -05:00
Jeremy Singer-Vine 216bedd00a Refactor handling of pts attribute
In doing so, deprecate the `curve_obj["points"]` attribute, and fix
`PageImage.draw_line(...)`'s handling of diagonal lines.
2023-02-03 14:27:36 -05:00
Jeremy Singer-Vine bad8eea88d Update CHANGELOG.md 2023-01-24 17:31:30 -05:00
Jeremy Singer-Vine 6351d979e9 Reorganize .utils 2023-01-24 17:28:27 -05:00
Jeremy Singer-Vine b2e037f650 Update CHANGELOG.md 2022-11-22 12:47:40 -05: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 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 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 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 3d80cebb17 Bump to version 0.7.3 2022-07-18 10:47:36 -04:00
Jeremy Singer-Vine 12daa3b1a8 Bump to version 0.7.2 2022-07-17 22:48:05 -04:00
Jeremy Singer-Vine 21b9519b0e Update CHANGELOG.md 2022-07-17 22:47:00 -04:00
Jeremy Singer-Vine 8687c8737f Update CHANGELOG.md 2022-07-16 17:22:12 -04:00
Jeremy Singer-Vine 6d4eec829a Add link to Chinese translation 2022-07-14 17:45:01 -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 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 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
Jeremy Singer-Vine 486cea840a Bump pdfminer.six to version 20220524 2022-05-24 13:48:57 -04:00
Jhonatan Lopes ca795d19c4 Add py.typed marker for PEP 561 compatibility (#657)
Via PR by @jhonatan-lopes.
2022-05-24 13:43:42 -04:00
Jeremy Singer-Vine b39fc46cb6 Tweak CTM desc. in CHANGELOG slightly 2022-05-17 11:01:49 -04:00
Jeremy Singer-Vine 4deac2522d Add --include/exclude-attrs to CLI & serialization
For `Serializer`, `.to_json(...)` and `.to_csv(...)`, the params are
`include_attrs`, and `exclude_attrs`.
2022-05-14 12:07:44 -04:00
Jeremy Singer-Vine 24f3532813 Remove utils.collate_chars(...)
This was the previous name (and then alias) for utils.extract_text(...),
and hasn't been featured in the documentation in a long time.
2022-05-13 16:10:13 -04:00
Jeremy Singer-Vine 58b1ab1b0a Add (experimental) page.search(...) feature
First proposed here: https://github.com/jsvine/pdfplumber/issues/201

Adding this feature involved refactoring and re-engineering a good chunk
of the text-layout-extraction code. As part of that, this commit
introduces two new classes, in utils.py: LayoutEngine and TextLayout.
They should be considered provisional, and may change name/approach in
the future.
2022-05-13 16:04:03 -04:00
Jeremy Singer-Vine ae6f99e691 Add char['matrix'], ctm submodule, and CTM class 2022-05-10 18:09:44 -04:00
Jeremy Singer-Vine 3cf4e6faac Update CHANGELOG.md 2022-05-06 13:59:13 -04:00
Jeremy Singer-Vine feb9d082d7 Add final bits of test coverage
Added weak tests for a couple of hard-to-test visual debugging methods
in display.py.

Also marked an exception-handling block in pdf.py as `pragma: nocover`
because we don't yet have a PDF to test it with, but the logic there is
simple and straightforward.
2022-05-06 10:19:48 -04:00
Jeremy Singer-Vine a7af394308 Update CHANGELOG.md 2022-05-06 10:17:14 -04:00
Jeremy Singer-Vine bc7864a08b Update CHANGELOG.md 2022-04-23 17:09:00 -04:00
Jeremy Singer-Vine 32de149137 Update CHANGELOG.md 2022-04-22 20:02:53 -04:00
Jeremy Singer-Vine 57ef25f2d3 Add PR 581 to CHANGELOG.md 2022-01-13 23:21:43 -05:00
Jeremy Singer-Vine 95c049d001 Fix CHANGELOG.md header depth typo 2021-12-21 09:08:13 -05:00
Jeremy Singer-Vine 7163d291bc Add release date to CHANGELOG.md 2021-12-21 08:56:07 -05:00
Jeremy Singer-Vine 47c49c2d07 Add recent commits to CHANGELOG.md 2021-12-16 22:37:54 -05:00