diff --git a/pypdf/_reader.py b/pypdf/_reader.py index b7b85f533..2bcd4175e 100644 --- a/pypdf/_reader.py +++ b/pypdf/_reader.py @@ -644,7 +644,7 @@ def _build_field( if s not in states: states.append(s) retval[key][NameObject("/_States_")] = ArrayObject(states) - if obj.get(FA.Ff, 0) & FA.FfBits.NoToggleToOff != 0: + if obj.get(FA.Ff, 0) & FA.FfBits.NoToggleToOff != 0 and "/Off" in retval[key]["/_States_"]: del retval[key]["/_States_"][retval[key]["/_States_"].index("/Off")] def _check_kids(