Commit Graph

713 Commits

Author SHA1 Message Date
Jeremy Singer-Vine 61e497640b Upgrade mypy and fix resulting type errors/warnings 2024-08-07 10:40:57 -04:00
Jeremy Singer-Vine 6e769ea66d Rerun upgrade code-formatting libraries 2024-08-07 10:40:57 -04:00
Jeremy Singer-Vine 4a91adc71e Upgrade code-formatting libraries 2024-08-07 10:40:57 -04:00
Jeremy Singer-Vine 491c8096c4 Remove consulting note from README 2024-08-07 10:40:57 -04:00
Jeremy Singer-Vine 046bd874d5 Apply mediabox fix to pts and path 2024-08-07 10:40:57 -04:00
Jeremy Singer-Vine 9025c3fc56 Fix object coordinates when mediabox != (0,0,...)
See issue #1181 for details.
2024-08-05 12:28:42 -04:00
Jeremy Singer-Vine 03a477f7f0 Add pdfplumber.open(unicode_norm=...)
Allows user to pre-normalize Unicode characters.

h/t @petermr + @agusluques in #905
2024-08-04 14:11:58 -04:00
Jeremy Singer-Vine 22494e8da2 Make Page.crop(...) also crop .annots/.hyperlinks
h/t @Safrone in #1171
2024-08-04 13:14:12 -04:00
Jeremy Singer-Vine b16acc36be Fix coords for annotations on CroppedPages 2024-08-04 13:09:42 -04:00
Jeremy Singer-Vine 1496cbda7d Add return_chars=True kwarg to Page.extract_words
h/t @cmdlineluser in #1173
2024-08-04 11:14:07 -04:00
Jeremy Singer-Vine 2dd9c0451d Fix username in changelog 2024-08-04 10:48:52 -04:00
Jeremy Singer-Vine c20cd3b617 Fix Page.attr: resolve before None-check (#1176)
h/t @zzhangyun + @mkl-public
2024-08-04 10:44:31 -04:00
Jeremy Singer-Vine d39302fa2c Add Table.columns, analogous to Table.rows (#1050)
h/t @Pk13055 for the suggestion
2024-08-02 19:00:23 -04:00
Jeremy Singer-Vine 48cab3f73e Change default .repair(...) setting h/t @Laubeee
Now passes "default" rather than "prepress" to Ghostscript's
`-dPDFSETTINGS` parameter.

Also makes that setting modifiable via `.repair(setting=...)`, where the
value is one of `"default"`, `"prepress"`, `"printer"`, or `"ebook"`.

See #874 and https://ghostscript.com/docs/9.54.0/VectorDevices.htm
2024-07-31 18:16:00 -04:00
Jeremy Singer-Vine 6c1bbd41a4 Update CHANGELOG.md 2024-07-14 17:34:19 -04:00
Jeremy Singer-Vine e5737d29c2 Fix broken CroppedPage.annots/hyperlinks
Issue was caused by missing `.initial_doctop` and `.rotation`
properties. h/t @Safrone in #1171
2024-07-14 17:27:05 -04:00
Jeremy Singer-Vine fc1e671687 Merge pull request #1169 from dhdaines/struct_follow_refs
fix: dereference structure element attributes
2024-07-14 17:15:06 -04:00
Jeremy Singer-Vine 937702da25 Add documentation for image properties
Thanks to @leorouxx in #1172 for the suggestion and much of the content.
2024-07-14 17:11:07 -04:00
David Huggins-Daines 3f16180d6e fix: dereference structure element attributes 2024-07-10 12:57:16 -04:00
Jeremy Singer-Vine cf67246825 Bump version to v0.11.2 v0.11.2 2024-07-06 17:53:08 -04:00
Jeremy Singer-Vine 1524f3efbe Update CHANGELOG.md 2024-07-06 17:52:20 -04:00
Jeremy Singer-Vine 5c51b4bd29 Upgrade setuptools 2024-07-06 17:42:15 -04:00
Jeremy Singer-Vine 6ce91ba394 Add py=1.11.0 to dev requirements 2024-07-06 17:28:55 -04:00
Jeremy Singer-Vine 915c168c40 Tweak type hints for updated stubs 2024-07-06 17:16:41 -04:00
Jeremy Singer-Vine caaf825d73 Update various dev requirements 2024-07-06 17:16:25 -04:00
Jeremy Singer-Vine 944eaedf2d Remove testing for Python 3.8, add for 3.12 2024-07-06 16:18:51 -04:00
Jeremy Singer-Vine 923707a816 Merge pull request #1161 from QuentinAndre11/develop
Add `extra_attrs` paramater to `.dedupe_chars(...)`
2024-07-06 16:16:24 -04:00
Jeremy Singer-Vine 2bdbb5b793 Upgrade pandas to avoid failing tests on numpy>=2 2024-07-06 16:02:13 -04:00
Jeremy Singer-Vine ecbb643bde Tweak CHANGELOG.md 2024-07-06 16:01:54 -04:00
Jeremy Singer-Vine acc9082138 Tweak dedupe_chars documentation slightly 2024-07-06 16:01:42 -04:00
QAN 1f57556201 use extra_attrs 2024-07-02 15:01:57 +02:00
QAN 76752c4a31 add ignore_char_properties arg in dedup_chars 2024-06-27 11:40:35 +02:00
Jeremy Singer-Vine 6c9ecb232c Add 'build' to Makefile phonies 2024-06-11 16:33:52 -04:00
Jeremy Singer-Vine 5a0a8fde52 Bump version to v0.11.1 v0.11.1 2024-06-11 16:32:52 -04:00
Jeremy Singer-Vine e43f6f900c Update CHANGELOG.md 2024-06-11 16:32:27 -04:00
Jeremy Singer-Vine 469f15f7ff Add README thanks to @aronweiler 2024-06-11 16:25:51 -04:00
Jeremy Singer-Vine 0a26f059e0 Add .get_textmap.cache_clear() to page.close()
h/t @aronweiler in #193

https://github.com/jsvine/pdfplumber/issues/193#issuecomment-2099747545
2024-06-11 16:21:54 -04:00
Jeremy Singer-Vine 4daf0aa1b9 Handle PDFDocEncoding failures in decode_text
Fixes issue #1147
2024-06-11 16:21:45 -04:00
Jeremy Singer-Vine aaa35c9c6b Fix coordinates of annots on rotated pages
PDFs represent annotation coordinates independently from page rotation,
so annot coordinates have to be adjusted.
2024-06-11 14:52:03 -04:00
Jeremy Singer-Vine 70534a7cc1 Fix repair=True proc args (stderr being captured) 2024-06-07 11:38:07 -04:00
Jeremy Singer-Vine 2e9819c96a Update form-parsing code in README, per #1120
h/t @jeremybmerrill
2024-04-19 11:30:38 -04:00
Jeremy Singer-Vine 147f2c4c07 Merge branch 'develop' of github.com:jsvine/pdfplumber into develop 2024-03-07 07:52:19 -05:00
Jeremy Singer-Vine 53306dc8f4 Bump to v0.11.0 v0.11.0 2024-03-07 07:42:37 -05:00
Jeremy Singer-Vine a983ec4422 Update CHANGELOG.md 2024-03-07 07:42:07 -05:00
Jeremy Singer-Vine 850fd45b02 Add {line,char}_dir{,rotated,render} params
... and in the process, deeply rewrite the text extraction code to be
more flexible with regards to reading/writing non top-to-bottom,
left-to-right text.

Major kudos and thanks to @afriedman412 for the initial idea, initial
prototype, and inspiration for these new features.

Breaking change: word["direction"] is no longer {1,-1} but instead
{"ltr","rtl","ttb","btt"}.

Deprecated: Text-extraction parameters `horizontal_ltr` and
`vertical_ttb`.
2024-03-06 20:53:03 -05:00
Jeremy Singer-Vine 1820247309 Add curve["path"] and curve["dash"]
... now that they're available in the latest pdfminer.six
2024-03-03 14:10:47 -05:00
Jeremy Singer-Vine cd2f768330 Upgrade pdfminer.six from 20221105 to 20231228 2024-03-03 08:34:04 -05:00
David Huggins-Daines 207312eae7 Some utility methods for logical structure (#1095) 2024-03-02 19:44:40 -05:00
Jeremy Singer-Vine efca277079 Fix layout-caching issue (#1097) caused by 0bfffc2
Layout wasn't actually getting cached, now it is.
2024-03-02 19:18:32 -05:00
Jeremy Singer-Vine 8912931bf1 Merge pull request #1094 from dhdaines/structure_fixes
Handle missing ParentTree
2024-02-16 12:03:37 -05:00