Commit Graph

624 Commits

Author SHA1 Message Date
Andy Friedman 9af84e2b5e Revert "linting"
This reverts commit c2564653e8.
2023-11-02 11:27:35 -04:00
Andy Friedman c2564653e8 linting 2023-11-01 16:13:56 -04:00
Andy Friedman 5a85ab7a0c add x_tolerance_ratio 2023-11-01 13:54:10 -04:00
Jeremy Singer-Vine d9561d15cc Merge pull request #1029 from jsvine/develop
Merge v0.10.3 into stable
2023-10-26 10:07:21 -04:00
Jeremy Singer-Vine 2e838d1194 Bump to v0.10.3 v0.10.3 2023-10-26 10:01:42 -04:00
Jeremy Singer-Vine 529b3d8126 Merge branch 'stable' into develop 2023-10-26 09:57:08 -04:00
Jeremy Singer-Vine ceef47b49d Merge pull request #1020 from hussainshaikh12/stable
Update link causing 404
2023-10-23 11:07:18 -04:00
Hussain Shaikh 94981ce23f Update link causing 404 2023-10-21 20:38:12 +05:30
Jeremy Singer-Vine 1bba5a8e62 Update CHANGELOG.md 2023-09-11 12:20:41 -04:00
Jeremy Singer-Vine 2429fd7bf3 Merge pull request #983 from dhdaines/issue-982
Respect `use_text_flow` in `extract_text`
2023-09-11 12:13:58 -04:00
David Huggins-Daines ed707a7ec6 fix: respect use_text_flow in extract_text (fixes #982) 2023-09-06 15:51:50 -04:00
Jeremy Singer-Vine 336f83f6da Update CHANGELOG.md 2023-08-19 11:40:55 -04:00
Jeremy Singer-Vine 4a76a1f3a5 Add hyperlinks and experimentality to mcid/tag notes 2023-08-19 11:38:39 -04:00
David Huggins-Daines 142fc90cc5 Support for marked content section IDs (#961) 2023-08-19 11:29:21 -04:00
Jeremy Singer-Vine d8b9c1581a Merge branch 'stable' into develop 2023-08-12 17:05:44 -04:00
Jeremy Singer-Vine 94da66c1b3 Add thanks to @jeremybmerrill 2023-08-12 17:05:21 -04:00
Jeremy B. Merrill 41498312a0 Update form-parsing example in README (#958)
Thanks to PR from @jeremybmerrill, who writes:

> This form-parsing example handles form fields recursively contained within other form fields, removes the incorrect-assumption that field-names are unique and includes the alternate field name in output (which is often a very useful guide to what's in a field).

> the prior form-parsing example used the field-name ("T" entry) as the key in the form_data dict, implicitly assuming that the field name is globally unique within a document. That's not a correct assumption; nested field names are often simply a numeric index like 1 or 0. The prior example also entirely ignored the TU entry alternate field name.
2023-08-12 17:03:39 -04:00
Jeremy Singer-Vine f6887b5b33 Add gs_path argument to .open(...) & .repair(...) 2023-08-06 17:24:00 -04:00
Jeremy Singer-Vine 7c2d46b4a1 Fix some CHANGELOG.md formatting 2023-07-29 15:05:54 -04:00
Jeremy Singer-Vine 87d5b4a3b1 Merge pull request #951 from jsvine/develop
Merge v0.10.2
2023-07-29 15:03:00 -04:00
Jeremy Singer-Vine f92a687f25 Bump to v0.10.2 v0.10.2 2023-07-29 14:52:50 -04:00
Jeremy Singer-Vine 267ec8a5d7 Update CHANGELOG.md 2023-07-29 14:51:38 -04:00
Jeremy Singer-Vine 30a52cb0ed Add PDF.path & fix .to_image() for zipped files
These are related changes, since the previous approach of using
`PDF.stream.name` to distinguish between on-path and filelike-object PDFs
doesn't work for zipped files (and possibly other filelike-objects that
have a `name` property).
2023-07-29 14:30:00 -04:00
Jeremy Singer-Vine 7af3d0fa96 Merge pull request #946 from dhdaines/iterable_geometry
Accept Iterable for geometry utils (fixes #945)
2023-07-28 14:46:16 -04:00
David Huggins-Daines 9014a2939f fix: upgrade mypy to avoid erroneous errors
See https://github.com/python/mypy/issues/13627 (among others)
2023-07-25 16:14:22 -04:00
David Huggins-Daines 72c3a0efde fix: isort 2023-07-25 16:10:46 -04:00
David Huggins-Daines 53bee23e5a feat: accept Iterable for geometry utils.
Note: this removes the fragile-looking type manipulation in intersects_bbox as
making it work with iterables is very ugly and I am not convinced of its
usefulness
2023-07-24 10:15:34 -04:00
Jeremy Singer-Vine 28f4ebeb3c Use pdfium's *public* (not private) render method
Thanks to @mara004 for flagging here:
https://github.com/jsvine/pdfplumber/discussions/899#discussioncomment-6520928
2023-07-23 18:19:50 -04:00
Jeremy Singer-Vine 90742bdcbc Bump to v0.10.1 v0.10.1 2023-07-19 08:58:41 -04:00
Jeremy Singer-Vine 7e2893106e Add antialias parameter to Page.to_image(...)
... and associated methods. Thanks to @cmdlineluser for flagging.

For details, see:
https://github.com/jsvine/pdfplumber/discussions/899#discussioncomment-6464765
2023-07-19 08:56:18 -04:00
Jeremy Singer-Vine f3c628ab54 Fix bug-report link to docs/repairing.md 2023-07-16 23:01:35 -04:00
Jeremy Singer-Vine 00386ad8ca Merge pull request #936 from jsvine/develop
v0.10.0
v0.10.0
2023-07-16 18:35:42 -04:00
Jeremy Singer-Vine 28c0afc35c Fix missing trailing parens in CHANGELOG.md 2023-07-16 18:30:29 -04:00
Jeremy Singer-Vine ab9164ba19 Update CITATION.cff 2023-07-16 18:25:36 -04:00
Jeremy Singer-Vine 9aa57dece4 Update CHANGELOG.md 2023-07-16 18:23:36 -04:00
Jeremy Singer-Vine c9d24d50b0 Remove support for Python 3.7 2023-07-16 18:22:58 -04:00
Jeremy Singer-Vine 34070b4985 Update .github/workflows/tests.yml 2023-07-16 18:10:14 -04:00
Jeremy Singer-Vine 00efbf02df Update pandas version in requirements-dev 2023-07-16 18:08:42 -04:00
Jeremy Singer-Vine b5c268d756 Fix PNG size tests for other platforms 2023-07-16 17:51:53 -04:00
Jeremy Singer-Vine 10ae47d024 Fix tuple/Tuple typesig for earlier Python versions 2023-07-16 17:45:24 -04:00
Jeremy Singer-Vine fbc6fac02f Merge branch 'develop' of github.com:jsvine/pdfplumber into develop 2023-07-16 17:39:43 -04:00
Jeremy Singer-Vine 70c25babf3 Bump to v0.10.0 2023-07-16 17:38:34 -04:00
Jeremy Singer-Vine 0cc1047816 Update CHANGELOG.md for v0.10.0 2023-07-16 17:34:35 -04:00
Jeremy Singer-Vine de65bd8698 Update examples 2023-07-16 17:33:25 -04:00
Jeremy Singer-Vine 3ab6649c03 Add repair notes to docs and bug report template 2023-07-16 17:18:46 -04:00
Jeremy Singer-Vine db6ae97bfb Add pdfplumber.repair(...) and .open(repair=True)
This commit adds convenience methods to repair PDFs on the fly and/or to
write repaired PDFs to disk.

Currently, this does so via Ghostscript using the method we've asked
many users to try by following the instructions at
https://superuser.com/questions/278562/how-can-i-fix-repair-a-corrupted-pdf-file

Now, hopefully, this saves folks a few steps.
2023-07-16 17:07:42 -04:00
Jeremy Singer-Vine df0e027fc7 Remove tox from setup.cfg 2023-07-16 15:41:44 -04:00
Jeremy Singer-Vine 788857ed03 Add Python 3.11 to supported versions 2023-07-16 15:40:52 -04:00
Jeremy Singer-Vine b0493732c4 Replace Wand with pypdfium2 for page.to_image(...)
This commit swaps out Wand (and its non-Python dependencies ImageMagick
and Ghostscript) for pypdfium2 for PageImage rendering. This has some
advantages:

- Less finicky: Wand often caused users problems, due to "MagickWand
  shared library not found" and "PolicyError: not authorized `PDF'"
  issues. By contrast, pypdfium2 seems (at least at first) to more
  self-contained and not require any system-tweaking.
- Faster: pypdfium2 appears to render images more quickly than Wand (see
  @cmdlineuser's tests in #899)
- More flexible: pypdfium2 appears to generate images with greater color
  depth; by default, pdfplumber quantizes those images so that they
  save/display compactly (in fact, with smaller file sizes than the
  previous code), this commit also adds parameters to retain all/more of
  the original, more detailed colors.

Thanks to @cmdlineuser in #899 for the suggestion.
2023-07-16 10:46:40 -04:00
Jeremy Singer-Vine ea5e2753df Move expanded notes on colors to docs/colors.md 2023-07-14 12:21:19 -04:00