The size of the doorway places no restriction on the length of an object that can be taken through it. Usually, the length is limited by the walls that are present on either side of the doorway (the hall or room size).
Perhaps you want to know the diagonal length of the opening. The Pythagorean theorem tells you it is
√((4 ft)² +(8 ft)²) = 4√5 ft ≈ 8.944 ft