Commit Graph

546 Commits

Author SHA1 Message Date
Samkit Jain 490239ac8e Correct placement of the close() method in the documentation
The method belongs to the `PDF` class and not the `Page` class and was in the incorrect section in the README file as pointed out by @sujayvadlakonda
Fixes #834
2023-03-06 12:21:03 +05:30
Jeremy Singer-Vine 25682fff36 Add note re. Wand's handling of "resolution"
Thanks to @jwestwsj for the suggestion in issue #760
2023-02-24 17:28:16 -05:00
Jeremy Singer-Vine b6847ad4cd Bump to v0.8.0 v0.8.0 2023-02-13 22:00:45 -05:00
Jeremy Singer-Vine cc3081a619 Thank @toshi1127 2023-02-13 21:52:57 -05:00
Jeremy Singer-Vine 24cab4d3fe Update CHANGELOG.md 2023-02-13 21:52:42 -05:00
Jeremy Singer-Vine 93f7dbd1a2 Add width & height kwargs to .to_image() #798 2023-02-13 18:49:18 -05:00
Jeremy Singer-Vine c4e1b294bb Allow *all* extract_text kwargs for tables
Any `text_`-prefixed table extraction setting now automatically gets
passed to `.extract_text(...)` via `table.extract(...)`.

This introduces one minor but breaking change, which is that
`keep_blank_chars` (previously, a valid table extraction setting) now
needs to be passed as `text_keep_blank_chars`.
2023-02-13 17:51:33 -05:00
Jeremy Singer-Vine d3662dec06 Mimic text layout better by padding right/bottom
Adds `layout_width` and `layout_height` to `utils.extract_text`, set to
page width and height by default on `page.extract_text`.
2023-02-13 17:38:40 -05:00
Jeremy Singer-Vine 82b93c4ba7 Merge branch 'develop' of github.com:jsvine/pdfplumber into develop 2023-02-13 09:36:31 -05:00
Jeremy Singer-Vine 75e33f8726 Merge pull request #811 from toshi1127/fix/calc_rotation
fix: calculate rotation using 0 when Rotate is None
2023-02-13 09:36:08 -05:00
toshi1127 a3ece0513c fix: calculate rotation using 0 when rotate is None 2023-02-13 11:18:33 +09:00
Jeremy Singer-Vine 4e04dae219 Give text-extraction own section in README 2023-02-07 17:07:46 -05:00
Jeremy Singer-Vine 3424b57612 Refactor text-extraction utilities 2023-02-07 17:06:59 -05:00
Jeremy Singer-Vine 8ed2c7ef06 Remove confusion about kwargs passed to wand.Image
Thanks to @pseudomonas in #798 for flagging.

Decided to go for a stricter approach, given the complexity of getting a
more flexible approach right. But open to PRs that provide the more
flexible approach.
2023-02-03 14:47:01 -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 4b7f3b5b65 Merge pull request #791 from conitrade/hotfix/typing-hints
fix typing hints to include io.BytesIO
2023-01-19 20:47:07 +01:00
Alexander Sennhauser d4107f62b1 fix typing hints to include io.BytesIO 2023-01-19 13:10:36 +01:00
Jeremy Singer-Vine 639c169a34 Merge branch 'stable' into develop 2023-01-10 03:55:55 -05:00
Jeremy Singer-Vine dbaf0cce53 Add note on to_image re. FilteredPage 2023-01-10 03:55:01 -05:00
Jeremy Singer-Vine c7600f2209 Merge branch 'stable' into develop 2022-12-08 11:49:37 -05:00
Jeremy Singer-Vine 5491dc2c34 Merge pull request #774 from wltrhslu/stable
Update README.md
2022-12-08 11:48:50 -05:00
wltrhslu d45eced209 Update README.md
Change broken ghostscript installation link
2022-12-08 17:01:09 +01:00
Jeremy Singer-Vine 6af87abe6c Add first attempt at CITATION.cff file
Cf. issue #755, thanks to @joaoccruz
2022-11-22 13:10:45 -05:00
Jeremy Singer-Vine f6741d3097 Rerun examples with v0.7.6 v0.7.6 2022-11-22 12:48:19 -05:00
Jeremy Singer-Vine 8b2ae7e92b Bump version to v0.7.6 2022-11-22 12:48:01 -05:00
Jeremy Singer-Vine b2e037f650 Update CHANGELOG.md 2022-11-22 12:47:40 -05:00
Jeremy Singer-Vine 8a0c12652c Restore "text" attr to .textboxhorizontal/etc.
Fix regression introduced in 9587cc7 / v0.6.2.
2022-11-22 12:24:10 -05:00
Jeremy Singer-Vine e63a0385bb Bump pdfminer.six to version 20221105 2022-11-22 10:41:47 -05:00
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