Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add textboxhorizontal/etc. when laparams (#359) #364

Merged
merged 2 commits into from
Feb 28, 2021
Merged

Conversation

jsvine
Copy link
Owner

@jsvine jsvine commented Feb 26, 2021

In response to issue #359, this commit reinstates access to higher-level layout objects (such as textboxhorizontal) when laparams is passed to pdfplumber.open(...). Had been removed in 0.5.24 via 1f87898.

Also adds a test for this behavior.

This commit reinstates access to higher-level layout objects (such as
`textboxhorizontal`) when `laparams` is passed to
`pdfplumber.open(...)`. Had been removed in `0.5.24` via 1f87898.

Also adds a test for this behavior.
@jsvine jsvine requested a review from samkit-jain February 26, 2021 23:56
@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

Merging #364 (0ae9606) into develop (2d1e687) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #364   +/-   ##
========================================
  Coverage    98.25%   98.25%           
========================================
  Files           10       10           
  Lines         1203     1205    +2     
========================================
+ Hits          1182     1184    +2     
  Misses          21       21           
Impacted Files Coverage Δ
pdfplumber/page.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d1e687...5bf3298. Read the comment docs.

README.md Outdated
@@ -72,6 +72,8 @@ The `open` method returns an instance of the `pdfplumber.PDF` class.

To load a password-protected PDF, pass the `password` keyword argument, e.g., `pdfplumber.open("file.pdf", password = "test")`.

To set layout analysis parameters to `pdfminer.six`'s layout engine, pass the `laparams` keyword argument, e.g., `pdfplumber.open("file.pdf", laparams = { "line_overlap": 0.7 })`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To set layout analysis parameters to `pdfminer.six`'s layout engine, pass the `laparams` keyword argument, e.g., `pdfplumber.open("file.pdf", laparams = { "line_overlap": 0.7 })`.
To set layout analysis parameters to `pdfminer.six`'s layout engine, pass the `laparams` keyword argument, e.g., `pdfplumber.open("file.pdf", laparams = { "line_overlap": 0.7 })`.

Very minor. There was an extra space.

Copy link
Collaborator

@samkit-jain samkit-jain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor typo suggestion. Looks good otherwise.

@jsvine
Copy link
Owner Author

jsvine commented Feb 28, 2021

Thanks! Tweaked that and updated the CHANGELOG to reference this PR.

@jsvine jsvine merged commit e46376c into develop Feb 28, 2021
@jsvine jsvine deleted the issue-359 branch October 20, 2021 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants