Skip to content

Commit

Permalink
fix: resolve filters before checking if it isnt a list (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines authored Nov 27, 2024
1 parent f29e217 commit 1f6c44e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playa/pdftypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ def get_any(self, names: Iterable[str], default: object = None) -> Any:
return default

def get_filters(self) -> List[Tuple[Any, Any]]:
filters = self.get_any(("F", "Filter"))
params = self.get_any(("DP", "DecodeParms", "FDecodeParms"), {})
filters = resolve1(self.get_any(("F", "Filter"), []))
params = resolve1(self.get_any(("DP", "DecodeParms", "FDecodeParms"), {}))
if not filters:
return []
if not isinstance(filters, list):
Expand Down
Binary file added samples/contrib/issue-1062-filters.pdf
Binary file not shown.

0 comments on commit 1f6c44e

Please sign in to comment.