Skip to content

Commit

Permalink
DOC: Example for orientation parameter of extract_text (#1206)
Browse files Browse the repository at this point in the history
Introduced by 8a27fa4 (#1175)
  • Loading branch information
pubpub-zz authored Aug 5, 2022
1 parent 759cbc3 commit a6b8fa6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/user/extract-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ page = reader.pages[0]
print(page.extract_text())
```

you can also select limit the text orientation you want to extract.<br/>
eg:<br/>
to extract only text oriented up
```python
print(page.extract_text(0))
```
to extract text oriented up and turned left
```python
print(page.extract_text((0, 90)))
```

refer to [extract\_text](../modules/PageObject.html#PyPDF2._page.PageObject.extract_text) for more details.

## Why Text Extraction is hard

Extracting text from a PDF can be pretty tricky. In several cases there is no
Expand Down

0 comments on commit a6b8fa6

Please sign in to comment.