Place a loose board near the door frame to take measure and saw it in the way it enters under the door frame. Don't forget to leave the place for a compensation joint!

Compensation joint should also be left next to the thresholds. You can achieve this by removing a piece of threshold’s bottom edge or by installing the appropriate threshold or edging panels.