Commit Graph

720 Commits

Author SHA1 Message Date
Michal Stolarczyk 396c5e3669 warn on unicode decoding errors in PDF annotations
in some cases the the annotations may contain some junk that hinders annotations processing altogether. This allows to ignore the error and warn instead, which is configurable via warn_unicode_error arguments in the PDF initializer and/or open() method.
2024-08-30 10:24:39 +02:00
Jeremy Singer-Vine e921ea748b Bump to v0.11.4 v0.11.4 2024-08-18 19:41:05 -04:00
Jeremy Singer-Vine 1d0eeff419 Quickfix for Python 3.8 type hint issue 2024-08-18 19:28:29 -04:00
Jeremy Singer-Vine e2a707b8bf Bump version to v0.11.3 v0.11.3 2024-08-07 15:50:29 -04:00
Jeremy Singer-Vine d7e4915c11 Update example notebooks 2024-08-07 15:50:10 -04:00
Jeremy Singer-Vine 349d315489 Prep CHANGELOG.md for next release 2024-08-07 15:48:35 -04:00
Jeremy Singer-Vine ab8cea9c9e Upgrade pytest 2024-08-07 10:40:57 -04:00
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