Skip to content

Commit

Permalink
Merge pull request #256 from mcrts/fix_visualise_elements_filter
Browse files Browse the repository at this point in the history
[FIX] ElementList filter on visualise
  • Loading branch information
jstockwin authored Oct 12, 2021
2 parents 8bac66f + 7df2b27 commit cd0be71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit cd0be71

Please sign in to comment.