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

[FIX] ElementList filter on visualise #256

Merged
merged 2 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- The `visualise` function properly uses the _elements_ parameter in order to filter visualised elements. ([#256](https://github.com/jstockwin/py-pdf-parser/pull/256))

## [0.10.0] - 2021-07-01
- [BREAKING] Changes from using pyqt5 to using tkinter for the visualise tool. This
Expand Down
2 changes: 1 addition & 1 deletion py_pdf_parser/visualise/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def __plot_current_page(self):
self.__ax.set_ylim([0, page.height])

page = self.document.get_page(self.current_page)
for element in page.elements:
for element in page.elements & self.elements:
style = STYLES["tagged"] if element.tags else STYLES["untagged"]
self.__plot_element(element, style)

Expand Down